Activating Nextcloud calendar leads to mysql-error

Yes, so far so good.
What about the config.php file?

grep \'db /usr/share/nextcloud/config/config.php |grep -v dbpass

There is just a command prompt:

grep 'db /usr/share/nextcloud/config/config.php |grep -v dbpass
>

Do you mean this?

grep db /usr/share/nextcloud/config/config.php |grep -v dbpass
  'dbtype' => 'mysql',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbdriveroptions' =>

Yes, I got caught by a formatting error.

dbhost is not using the new mariadb10.5 database socket connection.
it should be like:

'dbhost' => 'localhost:/run/rh-mariadb105-mariadb/nextcloud-mysql.sock',

assuming nextcloud database was correctly ported from mariadb5 to maridb10.5 during the nextcloud udpate.

I changed that in config.php and got an internal server error after refreshing nextcloud-web-interface:

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

Should we check the server log now?

you can check what occ upgrade has to say

To be clear, do you still have the latest nextcloud version available or it is in a reverted state?

occ upgrade gives the following:

An unhandled exception has been thrown:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_ap
pconfig' doesn't exist in /usr/share/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Con
nection.php:82
Stack trace:
#0 /usr/share/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Connection.php(82): PDO->q
uery('SELECT * FROM `...')
#1 /usr/share/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1062): Doctrine\DBAL\D
river\PDO\Connection->query('SELECT * FROM `...')
#2 /usr/share/nextcloud/lib/private/DB/Connection.php(237): Doctrine\DBAL\Connection->ex
ecuteQuery('SELECT * FROM `...', Array, Array, NULL)
#3 /usr/share/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(345): OC\DB\Co
nnection->executeQuery('SELECT * FROM `...', Array, Array)
#4 /usr/share/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(287): Doctrine\DBAL
\Query\QueryBuilder->execute()
#5 /usr/share/nextcloud/lib/private/AppConfig.php(361): OC\DB\QueryBuilder\QueryBuilder-
>execute()
#6 /usr/share/nextcloud/lib/private/AppConfig.php(126): OC\AppConfig->loadConfigValues()
#7 /usr/share/nextcloud/lib/private/AppConfig.php(317): OC\AppConfig->getApps()
#8 /usr/share/nextcloud/lib/private/legacy/OC_App.php(982): OC\AppConfig->getValues(fals
e, 'installed_versi...')
#9 /usr/share/nextcloud/lib/private/Server.php(692): OC_App::getAppVersions()
#10 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\S
erver->OC\{closure}(Object(OC\Server))
#11 /usr/share/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFra
mework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Containe
r))
#12 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimp
le\Container->offsetGet('OC\\Memcache\\Fac...')
#13 /usr/share/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\S
impleContainer->query('OC\\Memcache\\Fac...', false)
#14 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\Se
rverContainer->query('OC\\Memcache\\Fac...')
#15 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(182): OC\A
ppFramework\Utility\SimpleContainer->get('OC\\Memcache\\Fac...')
#16 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\A
ppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server)
)
#17 /usr/share/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFra
mework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Containe
r))
#18 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimp
le\Container->offsetGet('OCP\\ICacheFacto...')
#19 /usr/share/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\S
impleContainer->query('OCP\\ICacheFacto...', false)
#20 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\Se
rverContainer->query('OCP\\ICacheFacto...')
#21 /usr/share/nextcloud/lib/private/Server.php(1079): OC\AppFramework\Utility\SimpleCon
tainer->get('OCP\\ICacheFacto...')
#22 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\S
erver->OC\{closure}(Object(OC\Server))
#23 /usr/share/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFra
mework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Containe
r))
#24 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimp
le\Container->offsetGet('OCP\\Lock\\ILocki...')
#25 /usr/share/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\S
impleContainer->query('OCP\\Lock\\ILocki...', false)
#26 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\Se
rverContainer->query('OCP\\Lock\\ILocki...')
#27 /usr/share/nextcloud/lib/private/Server.php(2040): OC\AppFramework\Utility\SimpleCon
tainer->get('OCP\\Lock\\ILocki...')
#28 /usr/share/nextcloud/lib/private/Files/View.php(118): OC\Server->getLockingProvider(
)
#29 /usr/share/nextcloud/lib/private/Server.php(439): OC\Files\View->__construct()
#30 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\S
erver->OC\{closure}(Object(OC\Server))
#31 /usr/share/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFra
mework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Containe
r))
#32 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimp
le\Container->offsetGet('OC\\Files\\Node\\H...')
#33 /usr/share/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\S
impleContainer->query('OC\\Files\\Node\\H...', false)
#34 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\Se
rverContainer->query('OC\\Files\\Node\\H...')
#35 /usr/share/nextcloud/lib/private/Server.php(1403): OC\AppFramework\Utility\SimpleCon
tainer->get('OC\\Files\\Node\\H...')
#36 /usr/share/nextcloud/lib/base.php(594): OC\Server->boot()
#37 /usr/share/nextcloud/lib/base.php(1089): OC::init()
#38 /usr/share/nextcloud/console.php(48): require_once('/usr/share/next...')
#39 /usr/share/nextcloud/occ(11): require_once('/usr/share/next...')
#40 {main}

Next Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[42S02]: Base table or view not found:
1146 Table 'nextcloud.oc_appconfig' doesn't exist in /usr/share/nextcloud/3rdparty/doctr
ine/dbal/src/Driver/PDO/Exception.php:26
Stack trace:
#0 /usr/share/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Connection.php(87): Doctri
ne\DBAL\Driver\PDO\Exception::new(Object(PDOException))
#1 /usr/share/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1062): Doctrine\DBAL\D
river\PDO\Connection->query('SELECT * FROM `...')
#2 /usr/share/nextcloud/lib/private/DB/Connection.php(237): Doctrine\DBAL\Connection->ex
ecuteQuery('SELECT * FROM `...', Array, Array, NULL)
#3 /usr/share/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(345): OC\DB\Co
nnection->executeQuery('SELECT * FROM `...', Array, Array)
#4 /usr/share/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(287): Doctrine\DBAL
\Query\QueryBuilder->execute()
#5 /usr/share/nextcloud/lib/private/AppConfig.php(361): OC\DB\QueryBuilder\QueryBuilder-
>execute()
#6 /usr/share/nextcloud/lib/private/AppConfig.php(126): OC\AppConfig->loadConfigValues()
#7 /usr/share/nextcloud/lib/private/AppConfig.php(317): OC\AppConfig->getApps()
#8 /usr/share/nextcloud/lib/private/legacy/OC_App.php(982): OC\AppConfig->getValues(fals
e, 'installed_versi...')
#9 /usr/share/nextcloud/lib/private/Server.php(692): OC_App::getAppVersions()
#10 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\S
erver->OC\{closure}(Object(OC\Server))
#11 /usr/share/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFra
mework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Containe
r))
#12 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimp
le\Container->offsetGet('OC\\Memcache\\Fac...')
#13 /usr/share/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\S
impleContainer->query('OC\\Memcache\\Fac...', false)
#14 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\Se
rverContainer->query('OC\\Memcache\\Fac...')
#15 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(182): OC\A
ppFramework\Utility\SimpleContainer->get('OC\\Memcache\\Fac...')
#16 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\A
ppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server)
)
#17 /usr/share/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFra
mework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Containe
r))
#18 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimp
le\Container->offsetGet('OCP\\ICacheFacto...')
#19 /usr/share/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\S
impleContainer->query('OCP\\ICacheFacto...', false)
#20 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\Se
rverContainer->query('OCP\\ICacheFacto...')
#21 /usr/share/nextcloud/lib/private/Server.php(1079): OC\AppFramework\Utility\SimpleCon
tainer->get('OCP\\ICacheFacto...')
#22 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\S
erver->OC\{closure}(Object(OC\Server))
#23 /usr/share/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFra
mework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Containe
r))
#24 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimp
le\Container->offsetGet('OCP\\Lock\\ILocki...')
#25 /usr/share/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\S
impleContainer->query('OCP\\Lock\\ILocki...', false)
#26 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\Se
rverContainer->query('OCP\\Lock\\ILocki...')
#27 /usr/share/nextcloud/lib/private/Server.php(2040): OC\AppFramework\Utility\SimpleCon
tainer->get('OCP\\Lock\\ILocki...')
#28 /usr/share/nextcloud/lib/private/Files/View.php(118): OC\Server->getLockingProvider(
)
#29 /usr/share/nextcloud/lib/private/Server.php(439): OC\Files\View->__construct()
#30 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\S
erver->OC\{closure}(Object(OC\Server))
#31 /usr/share/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFra
mework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Containe
r))
#32 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimp
le\Container->offsetGet('OC\\Files\\Node\\H...')
#33 /usr/share/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\S
impleContainer->query('OC\\Files\\Node\\H...', false)
#34 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\Se
rverContainer->query('OC\\Files\\Node\\H...')
#35 /usr/share/nextcloud/lib/private/Server.php(1403): OC\AppFramework\Utility\SimpleCon
tainer->get('OC\\Files\\Node\\H...')
#36 /usr/share/nextcloud/lib/base.php(594): OC\Server->boot()
#37 /usr/share/nextcloud/lib/base.php(1089): OC::init()
#38 /usr/share/nextcloud/console.php(48): require_once('/usr/share/next...')
#39 /usr/share/nextcloud/occ(11): require_once('/usr/share/next...')
#40 {main}

Next Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executi
ng a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_appc
onfig' doesn't exist in /usr/share/nextcloud/3rdparty/doctrine/dbal/src/Driver/API/MySQL
/ExceptionConverter.php:47
Stack trace:
#0 /usr/share/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1780): Doctrine\DBAL\D
river\API\MySQL\ExceptionConverter->convert(Object(Doctrine\DBAL\Driver\PDO\Exception),
Object(Doctrine\DBAL\Query))
#1 /usr/share/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1719): Doctrine\DBAL\C
onnection->handleDriverException(Object(Doctrine\DBAL\Driver\PDO\Exception), Object(Doct
rine\DBAL\Query))
#2 /usr/share/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1067): Doctrine\DBAL\C
onnection->convertExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDO\Exception), 'SELE
CT * FROM `...', Array, Array)
#3 /usr/share/nextcloud/lib/private/DB/Connection.php(237): Doctrine\DBAL\Connection->ex
ecuteQuery('SELECT * FROM `...', Array, Array, NULL)
#4 /usr/share/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(345): OC\DB\Co
nnection->executeQuery('SELECT * FROM `...', Array, Array)
#5 /usr/share/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(287): Doctrine\DBAL
\Query\QueryBuilder->execute()
#6 /usr/share/nextcloud/lib/private/AppConfig.php(361): OC\DB\QueryBuilder\QueryBuilder-
>execute()
#7 /usr/share/nextcloud/lib/private/AppConfig.php(126): OC\AppConfig->loadConfigValues()
#8 /usr/share/nextcloud/lib/private/AppConfig.php(317): OC\AppConfig->getApps()
#9 /usr/share/nextcloud/lib/private/legacy/OC_App.php(982): OC\AppConfig->getValues(fals
e, 'installed_versi...')
#10 /usr/share/nextcloud/lib/private/Server.php(692): OC_App::getAppVersions()
#11 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\S
erver->OC\{closure}(Object(OC\Server))
#12 /usr/share/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFra
mework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Containe
r))
#13 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimp
le\Container->offsetGet('OC\\Memcache\\Fac...')
#14 /usr/share/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\S
impleContainer->query('OC\\Memcache\\Fac...', false)
#15 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\Se
rverContainer->query('OC\\Memcache\\Fac...')
#16 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(182): OC\A
ppFramework\Utility\SimpleContainer->get('OC\\Memcache\\Fac...')
#17 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\A
ppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server)
)
#18 /usr/share/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFra
mework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Containe
r))
#19 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimp
le\Container->offsetGet('OCP\\ICacheFacto...')
#20 /usr/share/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\S
impleContainer->query('OCP\\ICacheFacto...', false)
#21 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\Se
rverContainer->query('OCP\\ICacheFacto...')
#22 /usr/share/nextcloud/lib/private/Server.php(1079): OC\AppFramework\Utility\SimpleCon
tainer->get('OCP\\ICacheFacto...')
#23 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\S
erver->OC\{closure}(Object(OC\Server))
#24 /usr/share/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFra
mework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Containe
r))
#25 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimp
le\Container->offsetGet('OCP\\Lock\\ILocki...')
#26 /usr/share/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\S
impleContainer->query('OCP\\Lock\\ILocki...', false)
#27 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\Se
rverContainer->query('OCP\\Lock\\ILocki...')
#28 /usr/share/nextcloud/lib/private/Server.php(2040): OC\AppFramework\Utility\SimpleCon
tainer->get('OCP\\Lock\\ILocki...')
#29 /usr/share/nextcloud/lib/private/Files/View.php(118): OC\Server->getLockingProvider(
)
#30 /usr/share/nextcloud/lib/private/Server.php(439): OC\Files\View->__construct()
#31 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(160): OC\S
erver->OC\{closure}(Object(OC\Server))
#32 /usr/share/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFra
mework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Containe
r))
#33 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(127): Pimp
le\Container->offsetGet('OC\\Files\\Node\\H...')
#34 /usr/share/nextcloud/lib/private/ServerContainer.php(136): OC\AppFramework\Utility\S
impleContainer->query('OC\\Files\\Node\\H...', false)
#35 /usr/share/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\Se
rverContainer->query('OC\\Files\\Node\\H...')
#36 /usr/share/nextcloud/lib/private/Server.php(1403): OC\AppFramework\Utility\SimpleCon
tainer->get('OC\\Files\\Node\\H...')
#37 /usr/share/nextcloud/lib/base.php(594): OC\Server->boot()
#38 /usr/share/nextcloud/lib/base.php(1089): OC::init()
#39 /usr/share/nextcloud/console.php(48): require_once('/usr/share/next...')
#40 /usr/share/nextcloud/occ(11): require_once('/usr/share/next...')

The installed Nextcloud-version is nethserver-nextcloud-1.19.7-1.ns7.noarch, another version 1.20.0-1.ns7 is available as update.

list and compare the tables present on both nextcloud databases, the old one (running on mariadb5) and the new one (running on mariadb10). The problems could be due to partial database migration (…well, or something else).

1 Like

When I log in to MariaDB monitor I can see the server-version 5.5.68-MariaDB MariaDB Server. How can I switch to

?

I could use the nextcloud database, but when I tried to list the tables there was the mysql-error again:

Database changed
MariaDB [nextcloud]> show tables;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id:    1
Current database: nextcloud

ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
ERROR: Can't connect to the server

You can connect using the socket:

/opt/rh/rh-mariadb105/root/bin/mysql --socket="/var/run/rh-mariadb105-mariadb/nextcloud-mysql.sock"
use nextcloud;
show tables;

you can check if the service status gives more details about the error (or the mysql log)… for instance:

systemctl status -l mysql* *mariadb*

It’s empty!

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 5335
Server version: 10.5.16-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> use nextcloud;
Database changed
MariaDB [nextcloud]> show tables;
Empty set (0.001 sec)

Good reason for it not working :sweat_smile:

Investigate more about the cause of mysql error (mariadb5 used by default). Maybe some database checks & repair is needed.

Tried the command mysqlcheck:

mysqlcheck -u root -p nextcloud
Enter password: 
nextcloud.oc_accounts                              OK
nextcloud.oc_activity                              OK
nextcloud.oc_activity_mq                           OK
nextcloud.oc_addressbookchanges                    OK
nextcloud.oc_addressbooks                          OK
nextcloud.oc_appconfig                             OK
nextcloud.oc_audioplayer_albums                    OK
nextcloud.oc_audioplayer_artists                   OK
nextcloud.oc_audioplayer_genre                     OK
nextcloud.oc_audioplayer_playlist_tracks           OK
nextcloud.oc_audioplayer_playlists                 OK
nextcloud.oc_audioplayer_stats                     OK
nextcloud.oc_audioplayer_streams                   OK
nextcloud.oc_audioplayer_tracks                    OK
nextcloud.oc_audioplayer_whats_new                 OK
nextcloud.oc_authtoken                             OK
nextcloud.oc_bookmarks                             OK
nextcloud.oc_bookmarks_folders                     OK
nextcloud.oc_bookmarks_folders_public              OK
nextcloud.oc_bookmarks_root_folders                OK
nextcloud.oc_bookmarks_shared_folders              OK
nextcloud.oc_bookmarks_shared_to_shares            OK
nextcloud.oc_bookmarks_shares                      OK
nextcloud.oc_bookmarks_tags                        OK
nextcloud.oc_bookmarks_tree                        OK
nextcloud.oc_bruteforce_attempts                   OK
nextcloud.oc_calendar_invitations                  OK
nextcloud.oc_calendar_reminders                    OK
nextcloud.oc_calendar_resources                    OK
nextcloud.oc_calendar_resources_md                 OK
nextcloud.oc_calendar_rooms                        OK
nextcloud.oc_calendar_rooms_md                     OK
nextcloud.oc_calendarchanges                       OK
nextcloud.oc_calendarobjects                       OK
nextcloud.oc_calendarobjects_props                 OK
nextcloud.oc_calendars                             OK
nextcloud.oc_calendarsubscriptions                 OK
nextcloud.oc_cards                                 OK
nextcloud.oc_cards_properties                      OK
nextcloud.oc_cms_pico_websites                     OK
nextcloud.oc_collres_accesscache                   OK
nextcloud.oc_collres_collections                   OK
nextcloud.oc_collres_resources                     OK
nextcloud.oc_comments                              OK
nextcloud.oc_comments_read_markers                 OK
nextcloud.oc_dav_cal_proxy                         OK
nextcloud.oc_dav_shares                            OK
nextcloud.oc_deck_assigned_labels                  OK
nextcloud.oc_deck_assigned_users                   OK
nextcloud.oc_deck_attachment                       OK
nextcloud.oc_deck_board_acl                        OK
nextcloud.oc_deck_boards                           OK
nextcloud.oc_deck_cards                            OK
nextcloud.oc_deck_labels                           OK
nextcloud.oc_deck_stacks                           OK
nextcloud.oc_direct_edit                           OK
nextcloud.oc_directlink                            OK
nextcloud.oc_documents_invite                      OK
nextcloud.oc_documents_member                      OK
mysqlcheck: Got error: 2013: Lost connection to MySQL server during query when executing 'CHECK TABLE ... '

Maybe a connection timeout?

Can you try it after increasing mysql timeout and max_allowed_packet ?

/etc/my.cnf, or maybe better at /etc/my.cnf.d/nethserver.cnf where max_allowed_packet is set by default to 16MB

max_allowed_packet:

MariaDB [(none)]> show variables like 'max_allowed_packet';
+--------------------+------------+
| Variable_name      | Value      |
+--------------------+------------+
| max_allowed_packet | 1073741824 |
+--------------------+------------+

wait_timeout:
MariaDB [(none)]> SET GLOBAL wait_timeout=50000;

MariaDB [(none)]> show global variables like 'wait_timeout';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| wait_timeout  | 50000 |
+---------------+-------+

mysqlcheck run into the same error as before.

Is it worth to change the values manually in the *.cnf files, too?

I don’t know, I suppose it will do the same.

it crashes only using nextcloud database?
What about SHOW TABLE STATUS; on nextcloud database?

Yes! I could run mysqlcheck on other databases like oscdb or mysql without any errors.

SHOW TABLE STATUS

MariaDB [roundcubemail]> use nextcloud;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [nextcloud]> show table status;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id:    1
Current database: nextcloud

ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/m
ysql.sock' (111)
ERROR: Can't connect to the server

Sorry, just some general things to consider:

  • Investigate the mysql/mariadb crash (systemctl status -l …, journalctl -u …, logs) to get an idea of what is causing it.
  • Any current outage / forced shutdown before the update?
  • Disk problem (smartctl) or filesystem corruption (xfs_repair when partitions are offline, so maybe only after checking other things)?
  • Do you have a recent database backup?

Question: is it possibile that mysql and mariadb are trying to use the same port?

After executing SHOW TABLE STATUS on database nextcloud again I found some InnoDB-erros in mariadb.log:

InnoDB: Error: tried to read 16384 bytes at offset 0 12713984.
InnoDB: Was only able to read 12288.
221001 20:56:48  InnoDB: Operating system error number 5 in a file operation.
InnoDB: Error number 5 means 'Input/output error'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/operating-system-error-codes.html
InnoDB: File operation call: 'read'.
InnoDB: Cannot continue operation.
221001 20:56:49 mysqld_safe Number of processes running now: 0
221001 20:56:49 mysqld_safe mysqld restarted
221001 20:56:49 [Note] /usr/libexec/mysqld (mysqld 5.5.68-MariaDB) starting as process 7
34 ...
221001 20:56:49 InnoDB: The InnoDB memory heap is disabled
221001 20:56:49 InnoDB: Mutexes and rw_locks use GCC atomic builtins
221001 20:56:49 InnoDB: Compressed tables use zlib 1.2.7
221001 20:56:49 InnoDB: Using Linux native AIO
221001 20:56:49 InnoDB: Initializing buffer pool, size = 1.0G
221001 20:56:49 InnoDB: Completed initialization of buffer pool
221001 20:56:49 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
InnoDB: Restoring possible half-written data pages from the doublewrite buffer...
221001 20:56:50  InnoDB: Waiting for the background threads to start
221001 20:56:51 Percona XtraDB (http://www.percona.com) 5.5.61-MariaDB-38.13 started; lo
g sequence number 15577500711
221001 20:56:51 [Note] Plugin 'FEEDBACK' is disabled.
221001 20:56:51 [Note] Server socket created on IP: '0.0.0.0'.
221001 20:56:51 [Note] Event Scheduler: Loaded 0 events
221001 20:56:51 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.68-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Serv
er