/etc/init.d/mysql always check for /var/lib/mysql/mysql even if user set datadir in /etc/mysql/my.cnf to a different path than the default one. fix for/etc/init.d/mysql script is below: checkconfig() { dir="`cat /etc/mysql/my.cnf | grep datadir | awk -F = '{ print $2 }'`" if [ ! -d $dir/mysql ] ; then eerror "You dont appear to have the mysql database installed yet." eerror "Please run /usr/bin/mysql_install_db to have this done..." return 1 fi } HTH, Alessandro
...any chance to get this applied? :|
I'll try to get it done by this weekend. I'm a bit swamped right now, but I'll do what I can to close up as many bugs as possible this weekend, including this one, because its so easy thanks to the fix you've provided.
I believe the fix is in -r3!
reopening bug: the fix needs to be ported also to mysql-4.0.x
fixed files/mysql-4.0.rc6 follows, please merge in CVS: ---------> #!/sbin/runscript # Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later depend() { need net } checkconfig() { if [ ! -f /etc/mysql/my.cnf ] ; then eerror "No /etc/mysql/my.cnf file exists!" fi dir=`awk '{ if ( $0 ~ /^datadir[ \t]+=/ ) { print $3 } }' < /etc/mysql/my.cnf` if [ ! -d $dir/mysql ] ; then eerror "You dont appear to have the mysql database installed yet." eerror "Please run /usr/bin/mysql_install_db to have this done..." return 1 fi } start() { checkconfig || return 1 ebegin "Starting mysqld" start-stop-daemon --start --quiet --exec /usr/bin/mysqld_safe \ --background -- >/dev/null 2>&1 eend $? } stop () { ebegin "Stopping mysqld" start-stop-daemon --stop --quiet --pidfile=/var/run/mysqld/mysqld.pid eend $? } <--------- bye, Alessandro
again, any chance to get this applied? :| if would be nice to have this applied and to also have an euild for the new 4.0.7 release, which had been now marked "gamma" , and so completely reliable. is there anyone taking care of mysql ? thank you
ok thanks.