failed to stop MySQL server

Bug #1582067 reported by Zheng Xu
6
This bug affects 1 person
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/mysql.conf.d/mysqld.cnf \
  \
  && 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
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
 ...fail!
 * Stopping MySQL database server mysqld
   ...done.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.