Nextcloud MySQL Service Failing to Start - Need Assistance

Hello Nextcloud Community,

I need help with an issue I am facing on my Nextcloud server. The MySQL service for my Nextcloud installation is not starting, and I have been unable to resolve the problem.

Here is some relevant information about my setup:

Nextcloud is installed as a snap on a Raspberry Pi.
I am using a local server and accessing it through a home VPN.
I am able to connect to the server terminal via SSH.

The problem I am experiencing is that the Nextcloud server is not connecting, and I am receiving the following error message:

Failed to start Service for snap application nextcloud.mysql

Upon checking the logs, I found the following information:

2023-04-29T19:19:35+02:00 nextcloud.mysql[10835]: Starting MySQL
2023-04-29T19:19:36+02:00 nextcloud.mysql[10835]: . * The server quit without updating PID file (/tmp/pids/mysql.pid).
2023-04-29T19:19:36+02:00 systemd[1]: snap.nextcloud.mysql.service: Main process exited, code=exited, status=1/FAILURE
2023-04-29T19:19:36+02:00 systemd[1]: snap.nextcloud.mysql.service: Failed with result 'exit-code'.
2023-04-29T19:19:36+02:00 systemd[1]: snap.nextcloud.mysql.service: Service RestartSec=100ms expired, scheduling restart.
2023-04-29T19:19:36+02:00 systemd[1]: snap.nextcloud.mysql.service: Scheduled restart job, restart counter is at 5.
2023-04-29T19:19:36+02:00 systemd[1]: Stopped Service for snap application nextcloud.mysql.
2023-04-29T19:19:36+02:00 systemd[1]: snap.nextcloud.mysql.service: Start request repeated too quickly.
2023-04-29T19:19:36+02:00 systemd[1]: snap.nextcloud.mysql.service: Failed with result 'exit-code'.
2023-04-29T19:19:36+02:00 systemd[1]: Failed to start Service for snap application nextcloud.mysql.

Nextcloud version : 25.0.6snap1
Operating system and version : Raspbian GNU/Linux 10 (buster)

Thanks to everyone for support!

I solved with


sudo snap revert nextcloud

Now i have nextcloud 25.0.5 and MySQL start normally.

I had the exact same issue when upgrading to 25.0.6snap1 - MySQL wouldn’t start. Annoyingly I don’t actually use the MySQL service provided by the snap (as I have a separate MySQL server running on a different host) so I don’t need the one provided by the snap, but as it isn’t starting the rest of the snap fails to start.

Reverting to 25.0.5snap2 fixed the issue, I’ll try again later when a new version is published.

1 Like