In place upgrade to 5.7, after upgrade mysql won't start because of missing binaries

[url]https://www.percona.com/doc/percona-server/LATEST/upgrading_guide_56_57.html[/url]

I’m using that guide in the RPM based section, using centos. I have tried multiple times, if I install 5.6 it works, if I install 5.7 it won’t start because the binaries it points to in mysql.service do not exist on my system despite 5.7 being installed properly:

Systemd service file for Percona Server

# This service file is to start PS just with mysqld_safe

[Unit]
Description=MySQL Percona Server
After=network.target
OnFailure=service-status-mail@%n.service
After=syslog.target
OnFailure=service-status-mail@%n.service

[Install]
WantedBy=multi-user.target
Alias=mysql.service

[Service]

Needed to create system tables etc.

ExecStartPre=/usr/bin/mysql-systemd pre

Start main service

ExecStart=/usr/bin/mysqld_safe

Don’t signal startup success before a ping works

ExecStartPost=/usr/bin/mysql-systemd post

Give up if ping don’t get an answer

TimeoutSec=600

Restart=on-failure
RestartSec=10
PrivateTmp=false

this is the error in the journalctl:
Failed at step EXEC spawning /usr/bin/mysql-systemd: No such file or directory

I have ran a search and this file is not on my system. neither is mysqld_safe. I have looked online for an updated mysql.service file and can not find one. I have tried running /usr/sbin/mysqld directly since that actually is on my system but I’m not sure which parameters to pass to it or even what user to try to start it with (won’t let me start it as root to test).

If I remove the percona RPMs and reinstall the 56 server my data is still there and everything works.

Spent about 3 hours on this, not sure why 57 won’t start after installed and why there are missing binaries. I followed the guide to the letter.

Hi atrix;

What OS/version are you using? Below are what my systemd service files look like on my fresh CentOS 7.4 install:

[osboxes@osboxes ~]$ cat /usr/lib/systemd/system/mysqld.service

# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# systemd service file for MySQL forking server
#

[Unit]
Description=MySQL Server
Documentation=man:mysqld(8)
Documentation=http://dev.mysql.com/doc/refman/en/using-systemd.html
After=network.target
After=syslog.target

[Install]
WantedBy=multi-user.target
Alias=mysql.service

[Service]
User=mysql
Group=mysql

Type=forking

PIDFile=/var/run/mysqld/mysqld.pid

# Disable service start and stop timeout logic of systemd for mysqld service.
TimeoutSec=0

# Execute pre and post scripts as root
PermissionsStartOnly=true

# Needed to create system tables
ExecStartPre=/usr/bin/mysqld_pre_systemd

# Start main service
ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS

# Use this to switch malloc implementation
EnvironmentFile=-/etc/sysconfig/mysql

# Sets open_files_limit
LimitNOFILE = 5000

Restart=on-failure

RestartPreventExitStatus=1

PrivateTmp=false

[osboxes@osboxes ~]$ cat /usr/lib/systemd/system/mysqld@.service

# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# systemd service file for MySQL forking server
#

[Unit]
Description=MySQL Server
Documentation=man:mysqld(8)
Documentation=http://dev.mysql.com/doc/refman/en/using-systemd.html
After=network.target
After=syslog.target

[Install]
WantedBy=multi-user.target

[Service]
User=mysql
Group=mysql

Type=forking

PIDFile=/var/run/mysqld/mysqld-%i.pid

# Disable service start and stop timeout logic of systemd for mysqld service.
TimeoutSec=0

# Execute pre and post scripts as root
PermissionsStartOnly=true

# Needed to create system tables
ExecStartPre=/usr/bin/mysqld_pre_systemd %I

# Start main service
ExecStart=/usr/sbin/mysqld --defaults-group-suffix=@%I --daemonize --pid-file=/var/run/mysqld/mysqld-%i.pid $MYSQLD_OPTS

# Use this to switch malloc implementation
EnvironmentFile=-/etc/sysconfig/mysql

# Sets open_files_limit
LimitNOFILE = 5000

Restart=on-failure

RestartPreventExitStatus=1

PrivateTmp=false

Note they are quite a bit different that yours. Neither mysql-systemd nor mysqld_safe exist in my install either, so the fact that yours is calling mysql-systemd seems wrong (presuming your using a CentOS 7.x like OS). So I’d try re-installing 5.7, and then try using the above in the mysql.service and mysqld@.service files (backup your original ones first).

Also make sure you have a backup of your data as well in case something goes wrong.