failed to stop MySQL server
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Gearman MySQL UDF |
New
|
Undecided
|
Unassigned |
Bug Description
This is a random error which does not happen always.
Reproduce steps :
echo "===== Install mysql-server" \
&& apt-get -y install mysql-server \
\
&& echo "===== Enable remote access for mysql-server" \
&& sed -i 's/bind-address/# bind-address/' /etc/mysql/
\
&& echo "===== Start mysql service" \
&& service mysql start \
\
&& echo "===== Set default root password for remote access" \
&& echo "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;" | mysql -u root \
\
&& echo "===== Create user : 'ent-user'" \
&& echo "CREATE USER 'ent-user'@'%' IDENTIFIED BY 'ent-user';" | mysql -u root \
&& echo "GRANT USAGE ON *.* TO 'ent-user'@'%';" | mysql -u root \
&& echo "CREATE DATABASE IF NOT EXISTS \`ent-user\`;" | mysql -u root \
&& echo "GRANT ALL PRIVILEGES ON \`ent-user\`.* TO 'ent-user'@'%';" | mysql -u root \
\
&& echo "===== Stop mysql service" \
&& echo "===== Note : a false error will be reported randomly. Stop twice to get the right return code." \
&& (service mysql stop ; sleep 5s ; service mysql stop)
log :
===== Install mysql-server
blablabla ...
===== Enable remote access for mysql-server
===== Start mysql service
* Starting MySQL database server mysqld
...done.
===== Set default root password for remote access
===== Create user : 'ent-user'
===== Stop mysql service
===== Note : a false error will be reported randomly. Stop twice to get the right return code.
* Stopping MySQL database server mysqld
[91mERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/
[0m ...fail!
* Stopping MySQL database server mysqld
...done.