Description of problem: The script /etc/init.d/mysqld fail testing for mysql alive if the DB is password protected. Version-Release number of selected component (if applicable): How reproducible: every time Steps to Reproduce: 1. /etc/init.d/mysqld stop 2. /etc/init.d/mysqld start 3. Actual results: [root@localhost root]# /etc/init.d/mysqld stop Interruzione di MySQL: [ OK ] [root@localhost root]# /etc/init.d/mysqld start Timeout error occurred trying to start MySQL Daemon. Avvio di MySQL: [FALLITO] Expected results: Avvio di MySQL: [ OK ] Additional info:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=108779 if your mysql-root has a password you have to change the user for "mysqladmin ping" "-u none-mysql-existing-user" eg. $ grep mysqladmin /etc/init.d/mysqld # if [ -n "`/usr/bin/mysqladmin ping 2> /dev/null`" ]; then if [ -n "`/usr/bin/mysqladmin -unobody ping 2> /dev/null`" ]; then # if !([ -n "`/usr/bin/mysqladmin ping 2> /dev/null`" ]); then if !([ -n "`/usr/bin/mysqladmin -unobody ping 2> /dev/null`" ]); then
I have done the changes, all is ok. Could I ask you why the command must be " /usr/bin/mysqladmin ping 2> /dev/null " instead of = " /usr/bin/mysqladmin ping > /dev/null " ? In other words why 2 ? ( I am non a bash guru ( and also not a guru at all )) :-) ( from command line /usr/bin/mysqladmin ping result ok ; /usr/bin/mysqladmin ping 2 result in error ). Bye. Luca
perhaps should only the error(2) be redirected to /dev/null $ mysqladmin ping 2 > /dev/null and not the error_or_output $ mysqladmin ping > /dev/null 2>&1 see $ man bash /redirection /dirlist /2>&1 1 = standard output 2 = standard error i do not understand why this part "spin for a maximum of ten seconds ..." is in the mysqld-init-script or why it expect that the mysql-root has no password. afair it appeared the first time in fedora-test and is imho not necessary. i had no problems with redhat mysqld-init-scripts since rhl 7.x
The looping change was put in as a fix for bug #58372 in October 2003. Glad you fixed your problem. There is an updated init script which points out that you may need to change the mysqladmin ping line.
Is fixed package available? Damn annoying bug :)