[Bug 551130] Re: infinite loop in /etc/init/mysql.conf if mysqld is not running.
StephanNies
nies.stephan at googlemail.com
Thu May 27 18:07:56 BST 2010
Please note that the cause of the problem is that /etc/init/mysql.conf
is trying to start mysqld as user root. If you start as user mysql
everything works fine.
The infinte loop described above in
while ! /usr/bin/mysqladmin --defaults-file=$HOME/debian.cnf ping
do
sleep 1
done
is caused by mysqld not running and therefore /usr/bin/mysqladmin --defaults-file=$HOME/debian.cnf ping
failing.
With no proper timeout this causes an infinte loop.
So you have to apply the following 2 fixes to /etc/init/mysql.conf:
1) to make msqld work:
exec sudo -u mysql /usr/sbin/mysqld # <- important execute as use
mysql
2) to make sure the loop times out:
count=0
while [ $count -lt 10 ] && ! /usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping 2>/dev/null
do
echo "waiting for mysqld: ${count}s ..."
sleep 1
count=`expr $count + 1`
done
if [ $count -eq 10 ]
then
echo "timeout."
else
exec $HOME/debian-start
fi
--
infinite loop in /etc/init/mysql.conf if mysqld is not running.
https://bugs.launchpad.net/bugs/551130
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to mysql-dfsg-5.1 in ubuntu.
More information about the Ubuntu-server-bugs
mailing list