service mysql stop does not work on Ubuntu 14.04
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MySQL patches by Codership |
New
|
Undecided
|
Unassigned |
Bug Description
When we install mysql-server-
We found that package is not prepared for upstart yet.
File /etc/init/
so it falls back to /etc/init.d/mysql which does not work correctly:
root@ubuntu1404
* Stopping MySQL database server mysqld [ OK ]
--> This is wrong!!!
See trace and ps later:
root@ubuntu1404
+ set -e
+ set -u
+ test -x /usr/sbin/mysqld
+ . /lib/lsb/
+++ run-parts --lsbsysinit --list /lib/lsb/
++ for hook in '$(run-parts --lsbsysinit --list /lib/lsb/
++ '[' -r /lib/lsb/
++ . /lib/lsb/
++ for hook in '$(run-parts --lsbsysinit --list /lib/lsb/
++ '[' -r /lib/lsb/
++ . /lib/lsb/
+++ LOG_DAEMON_MSG=
++ FANCYTTY=
++ '[' -e /etc/lsb-
++ true
+++ dirname /etc/init.d/mysql
++ cd /etc/init.d
++ pwd -P
++ basename /etc/init.d/mysql
+ SELF=/etc/
+ CONF=/etc/
+ ERR_LOGGER='logger -p daemon.err -t /etc/init.d/mysql -i'
+ cd /
+ umask 077
+ export HOME=/etc/mysql/
+ HOME=/etc/mysql/
++ mysqld_get_param datadir
++ cut -d= -f2
++ tail -n 1
++ grep -- --datadir
++ tr ' ' '\n'
++ /usr/sbin/mysqld --print-defaults
+ datadir=
+ '[' -z /var/lib/mysql ']'
++ mysqld_get_param pid-file
++ cut -d= -f2
++ tail -n 1
++ grep -- --pid-file
++ tr ' ' '\n'
++ /usr/sbin/mysqld --print-defaults
+ pidfile=
+ '[' -z '' ']'
++ hostname
+ pidfile=
+ cmd=stop
+ '[' 1 -ge 1 ']'
+ shift
+ other_args=
+ case "$cmd" in
+ log_daemon_msg 'Stopping MySQL database server' mysqld
+ '[' -z 'Stopping MySQL database server' ']'
+ log_use_
+ TPUT=/usr/bin/tput
+ EXPR=/usr/bin/expr
+ '[' -t 1 ']'
+ '[' xxterm '!=' x ']'
+ '[' xxterm '!=' xdumb ']'
+ '[' -x /usr/bin/tput ']'
+ '[' -x /usr/bin/expr ']'
+ /usr/bin/tput hpa 60
+ /usr/bin/tput setaf 1
+ '[' -z ']'
+ FANCYTTY=1
+ case "$FANCYTTY" in
+ true
+ /usr/bin/tput xenl
++ /usr/bin/tput cols
+ COLS=266
+ '[' 266 ']'
+ '[' 266 -gt 6 ']'
++ /usr/bin/expr 266 - 7
+ COL=259
+ log_use_plymouth
+ '[' n = y ']'
+ plymouth --ping
+ printf ' * Stopping MySQL database server mysqld '
* Stopping MySQL database server mysqld ++ /usr/bin/expr 266 - 1
+ /usr/bin/tput hpa 265
+ mysqld_status check_dead nowarn
+ ps_alive=0
+ '[' -f /var/lib/
+ '[' check_dead = check_alive -a 0 = 1 ']'
+ '[' check_dead = check_dead -a 0 = 0 ']'
+ return 0
+ mysqld_status check_dead warn
+ ps_alive=0
+ '[' -f /var/lib/
+ '[' check_dead = check_alive -a 0 = 1 ']'
+ '[' check_dead = check_dead -a 0 = 0 ']'
+ return 0
+ log_end_msg 0
+ '[' -z 0 ']'
+ '[' 259 ']'
+ '[' -x /usr/bin/tput ']'
+ log_use_plymouth
+ '[' n = y ']'
+ plymouth --ping
+ printf '\r'
+ /usr/bin/tput hpa 259
+ echo '[ OK ]'
[ OK ]
+ return 0
root@ubuntu1404
root 6461 1 0 09:58 pts/0 00:00:00 /bin/sh /usr/bin/
mysql 6847 6461 0 09:58 pts/0 00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=
root 7558 1216 0 10:05 pts/0 00:00:00 grep --color=auto mysql