Product:
Search Type:

When using MySQL startup script /etc/init.d/mysql it reports MySQL startup failure, however this is not actually so. Why does it happen and how can it be resolved?

Article ID: 428 
Last Review: Nov,17 2005
APPLIES TO:
  • Plesk for Linux/Unix

RESOLUTION


This problem may occur under OS FedoraCore 1 and FC2. MySQL startup uses /usr/bin/mysqladmin utility with "ping" parameter, which requires administrator rights to be initialized. If  Plesk is installed in the system the utility can not be executed and it returns negative error code.

 

To resolve it you should modify MySQL startup script.

In the /etc/init.d/mysqld script find the following lines and insert -uadmin -p`cat /etc/psa/.psa.shadow` between /usr/bin/mysqladmin and "ping" as in the example below:

 

# Spin for a maximum of ten seconds waiting for the server to come up

 if [ -n "`/usr/bin/mysqladmin ping 2> /dev/null`" ]; then

 break;

 else

 sleep 1;

 fi

 done

 if !([ -n "`/usr/bin/mysqladmin ping 2> /dev/null`" ]); then

 echo "Timeout error occurred trying to start MySQL Daemon."

 action $"Starting $prog: " /bin/false

 else

 

 # Spin for a maximum of ten seconds waiting for the server to come up

 if [ -n "`/usr/bin/mysqladmin -uadmin -p`cat /etc/psa/.psa.shadow` ping 2> /dev/null`" ]; then

 break;

 else

 sleep 1;

 fi

  done

 if !([ -n "`/usr/bin/mysqladmin -uadmin -p`cat /etc/psa/.psa.shadow` ping 2> /dev/null`" ]); then


Please provide feedback on this article

Did this article help you solve your issue?
Yes
No
Partially
I do not know yet
 
Strongly Agree   Strongly Disagree
  9 8 7 6 5 4 3 2 1
The article is easy to understand
The article is accurate
Additional Comments:
*Please provide us with your email address in case we need to contact you.
*Please type the code you can see.
* - required fields