How to swap MariaDB 5.7 for Percona 5.7/8.0 on Ubuntu 20.04 running Plesk 18.0.33

I have a completely fresh VPS running Ubuntu 20.04 and Plesk Obsidian 18.0.33 that I am trying to replace the pre-installed MariaDB 57 with either Percona 5.7 or Percona 8.0. The documentation here says this is “supported”, but all it shows is what looks to be an old how-to on replacing MySql 5.5 with MariaDB 5.5, and says “For Percona Server, the steps are the same, the only differences are in configuring repositories and package names.”

Well, that apparently does not work since the pre-installed database is MariaDB. When I follow the instructions, I get to the point of apt-get install of the percona-server-server package, and as it looks to be close to completing the install throws the following error:
failed to stop mysql.service: unit mysql.service not loaded

mysql.service has never existed on this server, only mariadb.service. And by this point in the process, mariadb.service also does not exist.

I also searched for articles on switching MariaDB for Plesk, and found this for switching on CentOS. While different OS, the instructions there too are clear enough to see that it does not give any additional information than the standard upgrade doc.

Any suggestions?

1 Like

Can you try systemctl start mysqld ? I’ve seen this before where start mysql fails but start mysqld works. And yes, everything else you said is correct. Simply uninstall mariadb, and install percona packages.


Neither mysql.service not mysqld.service exist when I list all services via systemctl. To reiterate, the error listed above comes as part of the apt-get install percona-server-server and so it’s part of the built-in install process that is looking for the service that does not exist. So even if mysqld.service existed and I was able to start it, would the install acknowledge it?

As well, I attempted to resolve this via an uninstall of mariadb, but that ends up also uninstalling Plesk due to which I am trying to avoid. All docs I have found say that Percona should just be a “drop-in replacement.”

Thank you.

1 Like

The “drop-in replacement” refers to the binary itself, not necessarily the packages. You should be able to remove mariadb without uninstalling Plesk. I’m not familiar enough with apt but I’m positive there’s a way to say “uninstall this package and ignore dependencies”

1 Like

In order to remove package and leave it’s dependencies installed you should use dpkg instead of apt or aptitude,
so you could get the list of installed packages by dpkg -l
get the names of packages for removel and remove them using
sudo dpkg -r --force-depends <package_name>

1 Like