summaryrefslogtreecommitdiff
path: root/support-files
diff options
context:
space:
mode:
authormonty@hundin.mysql.fi <>2002-08-23 02:48:52 +0300
committermonty@hundin.mysql.fi <>2002-08-23 02:48:52 +0300
commitc7499a1039d89af3df63620841cafe4cdc034f0c (patch)
tree576302ffedeaa77cae39a3f3d50ab786b9dcddad /support-files
parenta6fac7c9fd4d43bedbc3778ac2500cb45d3d06bd (diff)
downloadmariadb-git-c7499a1039d89af3df63620841cafe4cdc034f0c.tar.gz
Portabilityfix in mysqladmin.c
Fix when using --localstatedir Cleaned up mysql.server
Diffstat (limited to 'support-files')
-rw-r--r--support-files/mysql.server.sh28
1 files changed, 21 insertions, 7 deletions
diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh
index 48bf004d758..7493fd29856 100644
--- a/support-files/mysql.server.sh
+++ b/support-files/mysql.server.sh
@@ -24,17 +24,27 @@
# Description: MySQL is a very fast and reliable SQL database engine.
### END INIT INFO
-
-# The following variables are only set for letting mysql.server find things.
+# If you install MySQL on some other places than @prefix@, then you
+# have to do one of the following thing for this script to work:
+#
+# - Run this script from the MySQL installation directory
+# - Create a /etc/my.cnf file with the following information:
+# [mysqld]
+# basedir=path-to-mysql-installation-directory
+# - Add the above to any other configuration file (for example ~/.my.ini)
+# and copy my_print_defaults to /usr/bin
+# - Add the path to the mysql-installation-directory to the basedir variable
+# below.
+#
# If you want to affect other MySQL variables, you should make your changes
-# in the /etc/my.cnf or other configuration files.
+# in the /etc/my.cnf, ~/.my.cnf or other MySQL configuration files.
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
-export PATH
+basedir=
+
+# The following variables are only set for letting mysql.server find things.
# Set some defaults
datadir=@localstatedir@
-basedir=
pid_file=
if test -z "$basedir"
then
@@ -43,6 +53,10 @@ then
else
bindir="$basedir/bin"
fi
+
+PATH=/sbin:/usr/sbin:/bin:/usr/bin:$basedir/bin
+export PATH
+
if test -z "$pid_file"
then
pid_file=$datadir/`@HOSTNAME@`.pid
@@ -123,7 +137,7 @@ case "$mode" in
touch /var/lock/subsys/mysql
fi
else
- echo "Can't execute $bindir/mysqld_safe"
+ echo "Can't execute $bindir/mysqld_safe from dir $basedir"
fi
;;