Strange database error

Good evening,

We have moved to a new server and are running the latest available Nextcloud version and PHP 8.3 again.

We exported the database using the export option and then imported it again on a new server using PHPmyAdmin. That all worked. The databases also often work smoothly. We have also transferred the users of the respective databases via the export/import function.

However, the MySQL service sometimes “hangs” and cannot be started via

sudo service mysql restart

restarting (start / stop) does not work either.

If you shut down the complete system running on a virtual machine on TrueNas, MySQL does not stop either. The virtual machine must then be switched off differently.

The error occurs irregularly and has no particular connection.

If I use the code

sudo service mysql status

I always get a different error message:

Thread 6316 (user : 'nextclouduser") did not exit

The funny thing is that we haven’t actively changed anything about this “person” - after a restart, everything is gone again.

But sometimes there are also completely different errors that have nothing to do with the Nextcloud, but still destroy MySQL:

mariadb: Table 'x' is marked as crashed and should be repaired

Many thanks for your answers in advance,

What version of MySQL?

sudo mysql -V
mysql  Ver 15.1 Distrib 10.11.7-MariaDB, for debian-linux-gnu (x86_64) using  EditLine wrapper
Server: Localhost via UNIX socket
Server type: MariaDB
Server version: 10.11.7-MariaDB-2ubuntu2 - Ubuntu 24.04
Protocol version: 10
User: root@localhost
Server character set: UTF-8 Unicode (utf8mb4)

This is my database version (one from PHPmyAdmin and one from the terminal)