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

My Nextcloud snap just updated to 25.0.7snap1 on my Raspberry Pi and this problem is still present:

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

As before reverting to 25.0.5snap2 fixed the issue for me.

Hi, just registered here to give some input:

I just had to revert, because at least for me 26.0.2snap1 has still the same issue. Like many in this thread the latest working version was 25.0.5snap2.
Running on Odroid HC2 with Ubuntu 22.04.2 LTS with Kernel 5.4.156-234 (if this helps).

Thanks & BR

Same problem with 26.0.3snap1. Reverting to 25.0.5snap2 fixes it.

Is there anything someone has successfully done to fix or mitigate the issue except reverting to 25.0.5snap2?

Is there a root-cause hypothesis?
Can I provide any additional information to help with the fix?