From: tymiwi Date: March 14 1999 6:40am Subject: Error in script mysql.server List-Archive: http://lists.mysql.com/mysql/192 Message-Id: <199903140640.IAA15391@fortunella.uta.fi> >Description: The script used for starting the server, file "mysql.server", doesn't work properly. All values which are greped from configuration file might get used "wrongly" by the script. While we debugged this problem we found a real bug, but more of that in another bug-report 8-) >How-To-Repeat: Just insert the following line to your example configuration (my-example.cnf) file copied in /etc/my.cnf : -------------------------------------------------------------------------- user = sql -------------------------------------------------------------------------- and the "mysql.server" script will try to launch following command line: -------------------------------------------------------------------------- /home/sql/bin/safe_mysqld --user= sql --pid-file=/home/sql/var/mysqld.pid -------------------------------------------------------------------------- As you see there's an EXTRA space after "--user=" switch. >Fix: Here's a quick hack/kludge/solution using tr command 8-) -------------------------------------------------------------------------- *** mysql.server.fixed Sun Mar 14 07:33:50 1999 --- mysql.server.orig Sun Mar 14 08:05:46 1999 *************** *** 16,22 **** basedir=/home/sql bindir=/home/sql/bin pid_file=/home/sql/var/mysqld.pid ! mysql_daemon_user=nobody # Run mysqld as this user. export PATH mode=$1 --- 16,22 ---- basedir=/home/sql bindir=/home/sql/bin pid_file=/home/sql/var/mysqld.pid ! mysql_daemon_user=root # Run mysqld as this user. export PATH mode=$1 *************** *** 36,50 **** then if grep "^datadir" $conf >/dev/null then ! datadir=`grep "^datadir" $conf | cut -f 2 -d= |tr -d ' '` fi if grep "^user" $conf >/dev/null then ! mysql_daemon_user=`grep "^user" $conf | cut -f 2 -d= |tr -d ' '` fi if grep "^pid-file" $conf >/dev/null then ! pid_file=`grep "^pid-file" $conf | cut -f 2 -d= |tr -d ' '` else if test -d "$datadir" then --- 36,50 ---- then if grep "^datadir" $conf >/dev/null then ! datadir=`grep "^datadir" $conf | cut -f 2 -d=` fi if grep "^user" $conf >/dev/null then ! mysql_daemon_user=`grep "^user" $conf | cut -f 2 -d=` fi if grep "^pid-file" $conf >/dev/null then ! pid_file=`grep "^pid-file" $conf | cut -f 2 -d=` else if test -d "$datadir" then *************** *** 53,64 **** fi if grep "^basedir" $conf >/dev/null then ! basedir=`grep "^basedir" $conf | cut -f 2 -d= |tr -d ' '` bindir=$basedir/bin fi if grep "^bindir" $conf >/dev/null then ! bindir=`grep "^bindir" $conf | cut -f 2 -d= |tr -d ' '` fi fi --- 53,64 ---- fi if grep "^basedir" $conf >/dev/null then ! basedir=`grep "^basedir" $conf | cut -f 2 -d=` bindir=$basedir/bin fi if grep "^bindir" $conf >/dev/null then ! bindir=`grep "^bindir" $conf | cut -f 2 -d=` fi fi -------------------------------------------------------------------------- >Submitter-Id: >Originator: tymiwi@stripped >Organization: University of Tampere >MySQL support: none >Synopsis: Error in script mysql.server >Severity: non-critical >Priority: low >Category: mysql >Class: sw-bug >Release: mysql-3.22.19b (Source distribution) >Environment: System: Linux fortunella 2.0.32 #2 Sat Sep 19 00:15:04 EET DST 1998 i586 unknown Architecture: i586 Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc GCC: Reading specs from /usr/lib/gcc-lib/i386-linux/2.7.2.1/specs gcc version 2.7.2.1 Compilation info: CC='gcc' CFLAGS='' CXX='c++' CXXFLAGS='' LDFLAGS='' Configure command: ./configure --prefix=/home/sql Perl: This is perl, version 5.004_01