Description of problem:
After upgrading to mysql-server 3.23.58, the init script reports a
failure to start mysqld, saying "Timeout error occurred trying to
start MySQL Daemon." Not sure if this is due to removal of anonymous
users, as suggested by comments in the init script.
Version-Release number of selected component (if applicable):
stops the running service, then shows message "ps -ef" shows mysql
process, and "service mysql stop" works too.
Steps to Reproduce:
1. execute "service mysql restart"
2. notice "Timeout error occurred trying to start MySQL Daemon." message
3. execute "ps -ef | grep mysql" and notice that mysqld is running
reports "Timeout error occurred trying to start MySQL Daemon."
should report "Starting MySQL: [ OK ]"
Attaching a patch that works for me.
Created attachment 108158 [details]
Patch to init script that works for me
It seems that I get no STDOUT output for an authentication failure, same as a
failed connection. Instead, we grab the STDERR and grep for the string "Check
that mysql is running".
Hmm ... that's a bit klugy but it's better than no solution at all.
Thanks for the suggestion!
*** Bug 137438 has been marked as a duplicate of this bug. ***
I see what you mean. Rather than look for a failure to connect, and
assuming all is OK when not found, better to test for either 1) ping
works; or 2) ping response with permission denied.
Try this patch instead...
Created attachment 108190 [details]
Different patch that's a bit less cludgy
I had the same problem. The cause appeared to be that I had removed
the anonymous users (empty user names) from the databases user list.
Recreating them back (without any privalliges) resolved the problem.
Now my mysqld starts in a few seconds without that error.
I'm not sure if it is safe to have these users exist in a production
I think the solution is to remove the need for having such users in
the database. Maybe just check if the daemon runs or check the log
file for the word ERROR after the last "start"
I just read that this is already discussed in (137438), see comment #3
in this report.
I missed that report in my query :-(
I have applied a patch for this, based on Jeremy's work, in rawhide
(mysql 4.1.7-8) --- I'll work on rolling it into the existing release
Created attachment 109161 [details]
Patch allows non-anonymous ping check by using username from sysconfig
I found this too. This is due to our security policy disallowed anonymous
access to the mysql server.
To stop this error appearing every time I boot, I can just change the init.d
script with a new username:
ping="/usr/bin/mysqladmin -ucorrect_user ping"
This username (and optionally password) should really be set in a sysconfig
variable, not the startup script, just like pand and dhcpd do.
This optional new file /etc/sysconfig/mysqld should be mode 600.
# Username and password for mysql ping
I understand it's a slightly different issue, but similar enough to stay within
this bug. Tell me if I'm wrong, or if there's a better way to fix it.
I have pushed out a fix for FC3 in mysql-3.23.58-14. It will still
need to be fixed in RHEL4.
This is now fixed in pending releases for all branches.