Multiple mysqld instances launched by systemd
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.5 |
New
|
Undecided
|
Vishal kasle | |||
5.6 |
New
|
Undecided
|
Vishal kasle | |||
5.7 |
New
|
Undecided
|
Vishal kasle |
Bug Description
Firstly, there may be some relation to https:/
I was having some issues with an install PS 5.7.14 whereby systemd failed to start MySQL during an `apt-get install --only-upgrade`. This left apt rather unhappy, but after some purging to get back to a clean state the problem still occurred.
The output during the install would be something like:
| Job for mysql.service failed. See 'systemctl status mysql.service' and 'journalctl -xn' for details.
| invoke-rc.d: initscript mysql, action "start" failed.
| dpkg: error processing package percona-
| subprocess installed post-installation script returned error exit status 1
| Processing triggers for systemd (215-17+deb8u2) ...
| Errors were encountered while processing:
| percona-
| E: Sub-process /usr/bin/dpkg returned an error code (1)
Then I noticed more than one MySQL instance running:
| $ pgrep -x mysqld | xargs ps -opid,ppid,
| PID PPID START USER CMD
| 30103 1 10:51 mysql /usr/sbin/mysqld --log_error_
| 30064 1 10:50 mysql /usr/sbin/mysqld --log_error_
| 30025 1 10:50 mysql /usr/sbin/mysqld --log_error_
| 29985 1 10:50 mysql /usr/sbin/mysqld --log_error_
| 29945 1 10:50 mysql /usr/sbin/mysqld --log_error_
| 29869 1 10:50 mysql /usr/sbin/mysqld --log_error_
Disabling the actions in /usr/share/
| case $1 in
| pre|post) echo $1 ;;
| esac
The MySQL datadir was fine and MySQL would run if executed outside of systemd or via the noop start script.
| # bash -x /usr/share/
| + case $1 in
| + sanity
| + MYSQLRUN=
| ++ get_path datadir
| ++ my_print_defaults mysqld
| ++ grep datadir
| ++ cut -d= -f2
| ++ tail -n 1
| + MYSQLDATA=
| + MYSQLFILES=
| + MYSQLLOG=
| + MYSQLKEYRING=
| + '[' '!' -d -a '!' -L ']'
| /usr/share/
| + '[' '!' -d /var/lib/
| + '[' '!' -d /var/lib/
| + '[' '!' -d /mysql -a '!' -L /mysql ']'
| ++ ls -A /mysql
| + '[' '!' '' ']'
| + su - mysql -s /bin/bash -c '/usr/sbin/mysqld --initialize-
| 2016-08-
| 2016-08-
| 2016-08-
|
| + su - mysql -s /bin/bash -c '/usr/sbin/mysqld --log_error_
| + pinger
| + /bin/true
| + sleep 1
| 2016-08-
| 2016-08-
| + mysqladmin ping
| + break
| + mysql -e 'INSTALL PLUGIN auth_socket SONAME '\''auth_
| ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
| + mysql -e 'USE mysql; UPDATE user SET plugin=
| ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
| + mysqladmin shutdown
| mysqladmin: connect to server at 'localhost' failed
| error: 'Access denied for user 'root'@'localhost' (using password: YES)'
| + '[' -x /usr/bin/
| + /usr/bin/
| + '[' '!' -d /var/log/mysql -a '!' -L /var/log/mysql ']'
| + '[' '!' -d /var/run/mysqld -a '!' -L /var/run/mysqld ']'
| + '[' '!' -r /etc/mysql/my.cnf ']'
| + echo 'Percona Server configuration not found at /etc/mysql/my.cnf. Please install one using update-
| Percona Server configuration not found at /etc/mysql/my.cnf. Please install one using update-
| + exit 1
After the script exited MySQL is still running:
| $ pgrep -x mysqld| xargs ps -opid,ppid,
| PID PPID START CMD
| 10349 1 11:22 /usr/sbin/mysqld --log_error_
A password had been set during install.
Hi, can you please send the version of the OS that you are using and also the exact steps that you followed to encounter this problem, so it can be reproduced. Also I tried it on an Ubuntu system, it worked fine. A copy of the my.cnf will also be helpful.