The mysql init scrip fires up mysqld-safe which is a shellscript as well with the commandline option "--background" and returns immediately while the mysqld is not started and capable to accept connections. This prevents depending services like gld (see bug #88574) from proper startup. Since someone comes up with a better solution, I suggest to add a "sleep 3" before "eend $?" in the init script to give mysql time to start the daemon process and accept connections before returning. Reproducible: Always Steps to Reproduce: please look at bug #88574
This patch should do the work, it's based on the creation of MySQL socket file. The function "mysql_get_socket" skip some checks because it's called after checkconfig.
Created attachment 57280 [details, diff] etc_init.d_mysql.patch
fixed in 4.0.24-r2 and 4.1.12
I still get !! on 4.1.12.
@Ron try to mannually copy "/usr/portage/dev-db/mysql/files/mysql-4.0.24-r2.rc6" in "/etc/init.d/mysql" . Probably this last one is not updated
The diff turns up nothing. It got updated properly. I noticed right away it was different, it says Starting mysqld (/etc/mysql/my.cnf) when i start it.
Well seeing as no one else seems to be having problems with this, I figured I'd try to understnad why it's not working on my box. My first problem seems to be with the stop() routine. If I run /etc/init.d/mysql stop it returns within less then a second, but mysql is still running afterward. But if I manually run the start-stop-daemon command it takes about 2 seconds and mysql is properly killed afterwards. My second problem is with start(). retstatus is set to $? right after the command is run, and it is 1. But I dont see anywhere where it gets set to 0 after the script has determined mysql has actually started.