After upgrading an Ubuntu 20.04 server via apt-get upgrade Percona mysql server does not start at boot.
Error:
sudo systemctl status mysql.service
● mysql.service - Percona Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: inactive (dead)
Jun 25 20:21:15 ubuntu-focal systemd[1]: Dependency failed for Percona Server.
Jun 25 20:21:15 ubuntu-focal systemd[1]: mysql.service: Job mysql.service/start failed with result 'dependency'.
However if I run sudo systemctl start mysql.service manually it will start as normal.
Doesn’t appear any error is logged to /var/log/mysql/error.log either.
I’ve also tried uninstalling and reinstalling Percona server.
Any help is greatly appreciated! This is a new one to me and Google’ing hasn’t turned up the fix as usual. However it did show a related post, but didn’t seem to have a resolution: Dependency failed for Percona Server
Any updates on this issue? I’ve got the same problem after apt update/upgrade on Debian 11, impossible to get the mysql service started with the endless “Dependency failed for Percona Server.” errors
sudo apt list --installed | grep -ie 'mysql\|percona':
mysql-common/oldstable,now 5.8+1.0.7 all [installed,automatic]
percona-release/stable,now 1.0-27.generic all [installed]
percona-server-client/stable,now 8.0.33-25-1.bullseye amd64 [installed,automatic]
percona-server-common/stable,now 8.0.33-25-1.bullseye amd64 [installed,automatic]
percona-server-server/stable,now 8.0.33-25-1.bullseye amd64 [installed]
Edit: Okay, so i got the mysql service up and running and it was the weirdest solutions i’ve ever come across:
Everytime i tried to start mysql i also got an error from remote-fs.target (cifs?) with the same dependency issue, i know why that one failed and that’s because i am on another network that can’t mount the remote target, i removed that /mnt/ entry/filesystem from fstab and after a reboot mysql once again starts without a problem
I doublechecked and added that entry back into fstab, a mountpoint that will fail due to it isn’t accessable on the network and sure enough, mysql refuses to start again.
I don’t get this, why on earth would that affect the startup of mysql? A failed mountpoint in fstab makes mysql refuse to start, why would the mysql startup process care about that?
I’ve not yet found a solution, this is a new one to me in the 12’ish years using Percona server. I was hoping for someone smarter than me on this to chime in
I’m here with similar issues; I’m using Vagrant+Virtualbox running Ubuntu 20.04 for development purposes and I get hit by Percona not starting up because of this issue during boot
Aug 23 10:52:07 vagrant mount[1018]: /sbin/mount.vboxsf: shared folder '/vagrant' was not found (check VM settings / spelling)
Aug 23 10:52:07 vagrant systemd[1]: vagrant.mount: Mount process exited, code=exited, status=1/FAILURE
Aug 23 10:52:07 vagrant systemd[1]: vagrant.mount: Failed with result 'exit-code'.
Aug 23 10:52:07 vagrant kernel: vboxsf: g_fHostFeatures=0x8000000f g_fSfFeatures=0x1 g_uSfLastFunction=29
Aug 23 10:52:07 vagrant kernel: *** VALIDATE vboxsf ***
Aug 23 10:52:07 vagrant kernel: vboxsf: Successfully loaded version 7.0.10 r158379
Aug 23 10:52:07 vagrant kernel: vboxsf: Successfully loaded version 7.0.10 r158379 on 5.4.0-42-generic SMP mod_unload (LINUX_VERSION_CODE=0x5042c)
Aug 23 10:52:07 vagrant kernel: vboxsf: SHFL_FN_MAP_FOLDER failed for '/vagrant': share not found
Aug 23 10:52:07 vagrant systemd[1]: Failed to mount /vagrant.
Aug 23 10:52:07 vagrant systemd[1]: Dependency failed for Remote File Systems.
Aug 23 10:52:07 vagrant systemd[1]: Dependency failed for Percona Server.
Aug 23 10:52:07 vagrant systemd[1]: mysql.service: Job mysql.service/start failed with result 'dependency'.
Aug 23 10:52:07 vagrant systemd[1]: remote-fs.target: Job remote-fs.target/start failed with result 'dependency'.
I don’t understand why Percona depends on remote filesystems to run, but it results in having to implement workarounds, because I need Percona to run at all times while I work with my project.
it is recommended to reinstall thirdparty software once you are updating your OS.
So it would be better to install Percona Software from the repository specified for the OS you are running
I was able to fix the issue by running following commads
Identify Percona Packages: apt list --installed | grep percona - This command lists all installed packages and filters for those related to Percona.
Remove Specific Packages: The following commands remove specific Percona-related packages:
apt remove percona-xtrabackup-80
apt remove percona-toolkit
apt remove percona-server-common
apt remove percona-server-client
apt remove percona-release
Update Package List: apt-get update - This command updates the list of available packages and their versions.
4.4. Remove Percona Source Lists*: rm -rf /etc/apt/sources.list.d/percona-* - This command removes all Percona-related source list files.
sudo chown -Rv _apt:root /var/cache/apt/archives/partial/ - This command changes the ownership of the directory to the _apt user and root group
and
sudo chmod -Rv 700 /var/cache/apt/archives/partial/ - This command sets the permissions of the directory such that only the owner can read, write, and execute files in the directory.
After this I was able to install Percona-server-server.
Not sure if this was best approach but please do let me know if there is a better way to do it.
Thank You
Yes if you have also this error in journalctl : remote-fs.target: Job remote-fs.target/start failed with result ‘dependency’.
It is perhaps of an other mount error of an unaccessible volume even if it’s not linked to mysql
remove the volume by comment the wrong mount volume in /etc/fstab
do sudo systemctl daemon-reload to update your systemctl
Then run normaly your systemctl start mysql.service