LP #1711734: Upgrade issue from community 5.6 to PS 5.6 on Debian9

Description

**Reported in Launchpad by Yves Trudeau last update 21-08-2017 12:15:15

If you first install MySQL Community 5.6 on Debian 9 and then install PS 5.6, MySQL community keeps the mysql.service in a "masked" state which causes PS 5.6 to fail to start.

root@debian:/etc/init.d# bash -x /etc/init.d/mysql start
+ set -e
+ set -u
+ PERCONA_PREFIX=/usr
+ test -x /usr/sbin/mysqld
+ startup_timeout=900
+ stop_timeout=300
+ '[' -e /etc/default/mysql ']'
+ . /etc/default/mysql
++ startup_timeout=900
++ stop_timeout=300
+ . /lib/lsb/init-functions
+++ run-parts --lsbsysinit --list /lib/lsb/init-functions.d
++ for hook in $(run-parts --lsbsysinit --list /lib/lsb/init-functions.d 2>/dev/null)
++ '[' -r /lib/lsb/init-functions.d/20-left-info-blocks ']'
++ . /lib/lsb/init-functions.d/20-left-info-blocks
++ for hook in $(run-parts --lsbsysinit --list /lib/lsb/init-functions.d 2>/dev/null)
++ '[' -r /lib/lsb/init-functions.d/40-systemd ']'
++ . /lib/lsb/init-functions.d/40-systemd
+++ _use_systemctl=0
+++ '[' -d /run/systemd/system ']'
+++ prog=mysql
+++ service=mysql.service
++++ systemctl -p LoadState --value show mysql.service
+++ state=masked
+++ '[' masked = masked ']'
+++ exit 0

root@debian:/etc/init.d# systemctl -p LoadState --value show mysql.service
masked

The fix is simply to unmask:

root@debian:/etc/init.d# systemctl unmask mysql.service
Removed /etc/systemd/system/mysql.service.
root@debian:/etc/init.d# ./mysql start
[ ok ] Starting mysql (via systemctl): mysql.service.

Originally I had installed:

root@debian:/etc/init.d# cat /home/debian/mysql.deb.installed
ii mysql-apt-config 0.8.7-1 all Auto configuration for MySQL APT Repo.
ii mysql-client 5.6.37-1debian9 amd64 MySQL Client meta package depending on latest version
ii mysql-common 5.8+1.0.2 all MySQL database common files, e.g. /etc/mysql/my.cnf
ii mysql-community-client 5.6.37-1debian9 amd64 MySQL Client
ii mysql-community-server 5.6.37-1debian9 amd64 MySQL Server

then I installed PS 5.6:

root@debian:/etc/init.d# dpkg -l | grep percona
ii libperconaserverclient18.1 5.6.36-82.1-1.stretch amd64 Percona Server database client library
ii percona-release 0.1-4.stretch all Package to install Percona gpg key and APT repo
ii percona-server-client-5.6 5.6.36-82.1-1.stretch amd64 Percona Server database client binaries
ii percona-server-common-5.6 5.6.36-82.1-1.stretch amd64 Percona Server database common files (e.g. /etc/mysql/my.cnf)
ii percona-server-server-5.6 5.6.36-82.1-1.stretch amd64 Percona Server database server binaries

I suggest the install script checks for the existence of a masked mysql.service entry and deal with it appropriately.

Environment

None

Smart Checklist

Activity

Show:

Kathy Williamson April 22, 2020 at 3:58 PM

MySQL 5.6 is scheduled for EOL in Feb 2021.  At this time, we do not believe that this issue will be fixed prior to EOL.  If you believe this issue is important enough to be be fixed prior to EOL, or that it also affects a later version, please leave a comment and we will consider the new information

Lalit Choudhary August 30, 2018 at 3:05 PM

Hi Yves,

Thank You for the report.

The issue is reproducible with 5.6 only, tested with APT and YUM packages.

On Debian based OS(APT repository ) I'm able to reproduce described behavior with given steps for PS 5.6 version.

On CentOS7 (YUM repository) percona server MySQL service will not start 

 

 

 

 

 

 

Won't Do

Details

Assignee

Reporter

Components

Affects versions

Priority

Smart Checklist

Created January 24, 2018 at 11:35 AM
Updated March 6, 2024 at 1:43 PM
Resolved April 22, 2020 at 3:58 PM