"Internal Server Error" for Nextcloud (seems to be a mySQL/MariaDB issue)

My YunoHost server

Hardware: RPi 3B+
YunoHost version: 11.0.9.15
I have access to my server : Through SSH
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue

After a Nextcloud upgrade (to v24), my Nextcloud instance is no more working:

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.

I noticed the following error in “/var/log/nginx/serverName-error.log”:

$ sudo more /var/log/nginx/serverName-error.log
2022/10/09 18:53:51 [error] 1491#1491: *98 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTA
TE[HY000] [2002] Connection refused in /var/www/nextcloud/lib/private/DB/Connection.php:139
Stack trace:
#0 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1519): OC\DB\Connection->connect()
#1 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1041): Doctrine\DBAL\Connection->getWrappedConnection()
#2 /var/www/nextcloud/lib/private/DB/Connection.php(261): Doctrine\DBAL\Connection->executeQuery()
#3 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(345): OC\DB\Connection->executeQuery()
#4 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(281): Doctrine\DBAL\Query\QueryBuilder->execute()
#5 /var/www/nextcloud/lib/private/AppConfig.php(411): OC\DB\QueryBuilder\QueryBuilder->execute()
#6 /var/www/nextcloud/lib/private/AppConfig.php(176): OC\AppConfig->loadConfigValues()
#7 /var/www/nextcloud/lib/private/" while reading response header from upstream, client: 2a01:e0a:212:c4e0:3688:8408:e550:724a, server: serverName.fr, request: "PROPFIND /owncloud/remote.php/caldav/calendars/myUser/
personnel/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.0-fpm-nextcloud.sock:", host: "serverName.fr"

nextcloud.log contains: “PHP message: PHP Fatal error: Uncaught Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTA
TE[HY000] [2002] Connection refused in /var/www/nextcloud/lib/private/DB/Connection.php:139”

Full log:

{"reqId":"z6bzAx1Xe8tvbAP2IA0c","level":4,"time":"2022-10-09T17:22:31+00:00","remoteAddr":"2a01:e0a:212:c4e0:3688:8408:e550:724a","user":"etincelles","app":"webdav","method":"PROPFIND","url":"/owncloud/remote.php/dav/files/etincelles/","message":"Doctrine\\DBAL\\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection refused","userAgent":"Mozilla/5.0 (Linux) mirall/3.4.2-1ubuntu1 (Nextcloud, ubuntu-5.15.0-48-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"24.0.4.1","exception":{"Exception":"Sabre\\DAV\\Exception\\ServiceUnavailable","Message":"Doctrine\\DBAL\\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection refused","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php","line":180,"function":"check","class":"OCA\\DAV\\Connector\\Sabre\\Auth","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php","line":135,"function":"check","class":"Sabre\\DAV\\Auth\\Plugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"beforeMethod","class":"Sabre\\DAV\\Auth\\Plugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":456,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":358,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":166,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Auth.php","Line":161,"CustomMessage":"--"}}
{"reqId":"dEBdOSLLEKoRjupjYaAY","level":4,"time":"2022-10-09T17:23:33+00:00","remoteAddr":"2a01:e0a:212:c4e0:3688:8408:e550:724a","user":"user1","app":"webdav","method":"PROPFIND","url":"/owncloud/remote.php/dav/files/user1/","message":"Doctrine\\DBAL\\Exception\\ConnectionLost: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away","userAgent":"Mozilla/5.0 (Linux) mirall/3.4.2-1ubuntu1 (Nextcloud, ubuntu-5.15.0-48-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"24.0.4.1","exception":{"Exception":"Sabre\\DAV\\Exception\\ServiceUnavailable","Message":"Doctrine\\DBAL\\Exception\\ConnectionLost: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"{closure}","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":456,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":75,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":168,"function":"handleException"}],"File":"/var/www/nextcloud/remote.php","Line":73,"CustomMessage":"--"}}
{"reqId":"2rUufEXMyhL5iSgCCnvP","level":4,"time":"2022-10-09T17:23:33+00:00","remoteAddr":"2a01:e0a:212:c4e0:3688:8408:e550:724a","user":"etincelles","app":"webdav","method":"PROPFIND","url":"/owncloud/remote.php/dav/files/etincelles/","message":"OC\\DB\\Exceptions\\DbalException: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away","userAgent":"Mozilla/5.0 (Linux) mirall/3.4.2-1ubuntu1 (Nextcloud, ubuntu-5.15.0-48-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"24.0.4.1","exception":{"Exception":"Sabre\\DAV\\Exception\\ServiceUnavailable","Message":"OC\\DB\\Exceptions\\DbalException: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"{closure}","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":456,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":75,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":168,"function":"handleException"}],"File":"/var/www/nextcloud/remote.php","Line":73,"CustomMessage":"--"}}

I don’t know if this is linked, but I also noticed that the service yunomdns failed to run:
https://paste.yunohost.org/oyififomeh

Any idea how I could fix that?
Thanks!

Failed to connect to the database

Sounds like an issue when nextcloud tries to connect to the mysql DB …

Maybe there’s more clues inside Nextcloud’s upgrade log (Tools > Logs > … find the nextcloud upgrade operation > Share the log with yunopaste (green button))

Thanks Aleks!

Here is the upgrade log: https://paste.yunohost.org/raw/yelidesapo

Hmmm maybe we can double-check with ‘sudo apt install php8.0-mysql --reinstall’ that the mysql driver to php8 is indeed installed … but I doubt it’s not the case ?

Naively also try to restart php8.0-fpm with systemctl restart php8.0-fpm, but same, I doubt it to be actually useful x_X

$ sudo apt install php8.0-mysql --reinstall
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/101 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 84526 files and directories currently installed.)
Preparing to unpack .../php8.0-mysql_1%3a8.0.24-1+0~20220929.42+debian11~1.gbp2c640a_armhf.deb ...
Unpacking php8.0-mysql (1:8.0.24-1+0~20220929.42+debian11~1.gbp2c640a) over (1:8.0.24-1+0~20220929.42+debian11~1.gbp2c640a) ...
Setting up php8.0-mysql (1:8.0.24-1+0~20220929.42+debian11~1.gbp2c640a) ...
Processing triggers for php8.0-fpm (1:8.0.24-1+0~20220929.42+debian11~1.gbp2c640a) ...
Processing triggers for php8.0-cli (1:8.0.24-1+0~20220929.42+debian11~1.gbp2c640a) ...
Scanning processes...                                                                                                                                                                                              
Scanning processor microcode...                                                                                                                                                                                    
Scanning linux images...                                                                                                                                                                                           

Running kernel seems to be up-to-date.
Failed to check for processor microcode upgrades.
No services need to be restarted.
No containers need to be restarted.
No user sessions are running outdated binaries.

Still the same Nextcloud error, even after having restarted php8.0-fpm.

It seems the issue is not related to Nextcloud but to the mySQL database.

Indeed, the Baikal admin page is displaying the message “Baïkal was not able to establish a connexion to the configured MySQL database (as configured in config/baikal.yaml).

So, I tryed:

$ sudo systemctl status mysql.service 
● mariadb.service - MariaDB 10.5.15 database server                                                                                                                                                               
     Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)                                                                                                                        
     Active: activating (auto-restart) (Result: signal) since Mon 2022-10-10 13:52:12 CEST; 4s ago                                                                                                                
       Docs: man:mariadbd(8)                                                                                                                                                                                      
             https://mariadb.com/kb/en/library/systemd/                                                                                                                                                           
    Process: 14544 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)                                                                                       
    Process: 14545 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)                                                                                      
    Process: 14549 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ]   && systemctl set-environment _WSREP_START_POSITION=$VAR >
    Process: 14614 ExecStart=/usr/sbin/mariadbd $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=killed, signal=ABRT)
    Process: 14671 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)                                                                                     
    Process: 14673 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0/SUCCESS)                                                                                                                          
   Main PID: 14614 (code=killed, signal=ABRT)                                                                                                                                                                     
     Status: "Taking your SQL requests now..."                                                                                                                                                                    
        CPU: 1.993s                                                                                                                                                                                               
                                                                                                                                                                                                                  
Oct 10 13:52:19 myServer mariadbd[15294]: Version: '10.5.15-MariaDB-0+deb11u1'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Raspbian 11                                                                           
Oct 10 13:52:19 myServer systemd[1]: Started MariaDB 10.5.15 database server.                                                                                                                                        
Oct 10 13:52:19 myServer /etc/mysql/debian-start[15318]: /usr/bin/mysql_upgrade: the '--basedir' option is always ignored
Oct 10 13:52:19 myServer /etc/mysql/debian-start[15318]: Looking for 'mysql' as: /usr/bin/mysql
Oct 10 13:52:19 myServer /etc/mysql/debian-start[15318]: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
Oct 10 13:52:19 myServer /etc/mysql/debian-start[15318]: This installation of MariaDB is already upgraded to 10.5.15-MariaDB.
Oct 10 13:52:19 myServer /etc/mysql/debian-start[15318]: There is no need to run mysql_upgrade again for 10.5.15-MariaDB.
Oct 10 13:52:19 myServer /etc/mysql/debian-start[15318]: You can use --force if you still want to run mysql_upgrade
Oct 10 13:52:19 myServer /etc/mysql/debian-start[15326]: Checking for insecure root accounts.                                                                                                                        
Oct 10 13:52:19 myServer /etc/mysql/debian-start[15330]: Triggering myisam-recover for all MyISAM tables and aria-recover for all Aria tables

If restart the service (systemctl status mysql.service), it is running well (Active) but back to the “activating (auto-restart)” status after few minutes…

How could I check that mySQL database is running fine?

Same issue, looks like: MariaDB keeps restarting

I’ve upgraded to NC24 some time ago, so definitely not related to that.

Could we try upgrading MariaDB? (I mean to not use Debian but rather MariaDB repo). Not sure what is the position of YNH on not using debian repos.

I am still having Nextcloud (and Baikal) down. Apparently due to MariaDB/mySQL errors.
Does anyone have any idea how to solve this problem?

# journalctl -xe
Oct 21 11:00:01 myDomain mariadbd[16508]: 2022-10-21 11:00:01 0 [Note] InnoDB: Uses event mutexes
Oct 21 11:00:01 myDomain mariadbd[16508]: 2022-10-21 11:00:01 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
Oct 21 11:00:01 myDomain mariadbd[16508]: 2022-10-21 11:00:01 0 [Note] InnoDB: Number of pools: 1
Oct 21 11:00:01 myDomain mariadbd[16508]: 2022-10-21 11:00:01 0 [Note] InnoDB: Using generic crc32 instructions
Oct 21 11:00:02 myDomain mariadbd[16508]: 2022-10-21 11:00:02 0 [Note] InnoDB: Using Linux native AIO
Oct 21 11:00:02 myDomain mariadbd[16508]: 2022-10-21 11:00:02 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
Oct 21 11:00:02 myDomain mariadbd[16508]: 2022-10-21 11:00:02 0 [Note] InnoDB: Completed initialization of buffer pool
Oct 21 11:00:02 myDomain mariadbd[16508]: 2022-10-21 11:00:02 0 [Note] InnoDB: 128 rollback segments are active.
Oct 21 11:00:02 myDomain CRON[16450]: pam_unix(cron:session): session closed for user nextcloud
Oct 21 11:00:02 myDomain mariadbd[16508]: 2022-10-21 11:00:02 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
Oct 21 11:00:02 myDomain mariadbd[16508]: 2022-10-21 11:00:02 0 [Note] InnoDB: Creating shared tablespace for temporary tables
Oct 21 11:00:02 myDomain mariadbd[16508]: 2022-10-21 11:00:02 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
Oct 21 11:00:02 myDomain mariadbd[16508]: 2022-10-21 11:00:02 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
Oct 21 11:00:02 myDomain mariadbd[16508]: 2022-10-21 11:00:02 0 [Note] InnoDB: 10.5.15 started; log sequence number 8248287051; transaction id 356214538
Oct 21 11:00:02 myDomain mariadbd[16508]: 2022-10-21 11:00:02 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
Oct 21 11:00:02 myDomain mariadbd[16508]: 2022-10-21 11:00:02 0 [Note] Plugin 'FEEDBACK' is disabled.
Oct 21 11:00:02 myDomain mariadbd[16508]: 2022-10-21 11:00:02 0 [Note] InnoDB: Buffer pool(s) load completed at 221021 11:00:02
Oct 21 11:00:02 myDomain mariadbd[16508]: 2022-10-21 11:00:02 0 [Note] Server socket created on IP: '127.0.0.1'.
Oct 21 11:00:02 myDomain mariadbd[16508]: 2022-10-21 11:00:02 0 [Note] Reading of all Master_info entries succeeded
Oct 21 11:00:02 myDomain mariadbd[16508]: 2022-10-21 11:00:02 0 [Note] Added new Master_info '' to hash table
Oct 21 11:00:02 myDomain mariadbd[16508]: 2022-10-21 11:00:02 0 [Note] /usr/sbin/mariadbd: ready for connections.
Oct 21 11:00:02 myDomain mariadbd[16508]: Version: '10.5.15-MariaDB-0+deb11u1'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Raspbian 11
Oct 21 11:00:02 myDomain postfix/pickup[13549]: 279E58009A: uid=998 from=<nextcloud>
Oct 21 11:00:02 myDomain systemd[1]: Started MariaDB 10.5.15 database server.
░░ Subject: A start job for unit mariadb.service has finished successfully
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ A start job for unit mariadb.service has finished successfully.
░░ 
░░ The job identifier is 381109.
Oct 21 11:00:02 myDomain postsrsd[16535]: srs_forward: <nextcloud@myDomain.fr> not rewritten: Domain excluded by policy
Oct 21 11:00:02 myDomain /etc/mysql/debian-start[16534]: Upgrading MySQL tables if necessary.
Oct 21 11:00:02 myDomain postfix/cleanup[16516]: 279E58009A: message-id=<20221021090002.279E58009A@myDomain.fr>
Oct 21 11:00:02 myDomain postfix/qmgr[13550]: 279E58009A: from=<nextcloud@myDomain.fr>, size=5022, nrcpt=1 (queue active)
Oct 21 11:00:02 myDomain /etc/mysql/debian-start[16539]: /usr/bin/mysql_upgrade: the '--basedir' option is always ignored
Oct 21 11:00:02 myDomain /etc/mysql/debian-start[16539]: Looking for 'mysql' as: /usr/bin/mysql
Oct 21 11:00:02 myDomain /etc/mysql/debian-start[16539]: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
Oct 21 11:00:02 myDomain /etc/mysql/debian-start[16539]: This installation of MariaDB is already upgraded to 10.5.15-MariaDB.
Oct 21 11:00:02 myDomain /etc/mysql/debian-start[16539]: There is no need to run mysql_upgrade again for 10.5.15-MariaDB.
Oct 21 11:00:02 myDomain /etc/mysql/debian-start[16539]: You can use --force if you still want to run mysql_upgrade
Oct 21 11:00:02 myDomain /etc/mysql/debian-start[16549]: Checking for insecure root accounts.
Oct 21 11:00:02 myDomain /etc/mysql/debian-start[16553]: Triggering myisam-recover for all MyISAM tables and aria-recover for all Aria tables
Oct 21 11:00:02 myDomain postfix/pipe[16542]: 279E58009A: to=<nextcloud@myDomain.fr>, orig_to=<nextcloud>, relay=dovecot, delay=0.41, delays=0.17/0.04/0/0.2, dsn=5.1.1, status=bounced (user unknown)
Oct 21 11:00:02 myDomain postsrsd[16535]: srs_forward: <""> not rewritten: No at sign in sender address
Oct 21 11:00:02 myDomain postfix/cleanup[16516]: 7B90880169: message-id=<20221021090002.7B90880169@myDomain.fr>
Oct 21 11:00:02 myDomain postfix/qmgr[13550]: 7B90880169: from=<>, size=6812, nrcpt=1 (queue active)
Oct 21 11:00:02 myDomain postfix/bounce[16559]: 279E58009A: sender non-delivery notification: 7B90880169
Oct 21 11:00:02 myDomain postfix/qmgr[13550]: 279E58009A: removed

If I check my mySQL databases, the result could be:

# sudo mysqlcheck --all-databases
baikal.addressbookchanges                          OK
baikal.addressbooks                                OK
baikal.calendarchanges                             OK
baikal.calendarinstances                           OK
baikal.calendarobjects                             OK
baikal.calendars                                   OK
baikal.calendars_3_1                               OK
baikal.calendarsubscriptions                       OK
baikal.cards                                       OK
baikal.groupmembers                                OK
baikal.locks                                       OK
baikal.principals                                  OK
baikal.propertystorage                             OK
baikal.schedulingobjects                           OK
baikal.users                                       OK
mysql.column_stats                                 OK
mysql.columns_priv                                 OK
mysql.db                                           OK
mysql.event                                        OK
mysql.func                                         OK
mysql.global_priv                                  OK
mysql.gtid_slave_pos                               OK
mysql.help_category                                OK
mysql.help_keyword                                 OK
mysql.help_relation                                OK
mysql.help_topic                                   OK
mysql.index_stats                                  OK
mysql.innodb_index_stats                           OK
mysql.innodb_table_stats                           OK
mysql.plugin                                       OK
mysql.proc                                         OK
mysql.procs_priv                                   OK
mysql.proxies_priv                                 OK
mysql.roles_mapping                                OK
mysql.servers                                      OK
mysql.table_stats                                  OK
mysql.tables_priv                                  OK
mysql.time_zone                                    OK
mysql.time_zone_leap_second                        OK
mysql.time_zone_name                               OK
mysql.time_zone_transition                         OK
mysql.time_zone_transition_type                    OK
mysql.transaction_registry                         OK
nextcloud.oc_accounts                              OK
nextcloud.oc_accounts_data                         OK
nextcloud.oc_activity                              OK
nextcloud.oc_activity_mq                           OK
nextcloud.oc_addressbookchanges                    OK
nextcloud.oc_addressbooks                          OK
nextcloud.oc_appconfig                             OK
nextcloud.oc_authorized_groups                     OK
nextcloud.oc_authtoken                             OK
nextcloud.oc_bruteforce_attempts                   OK
nextcloud.oc_calendar_appt_bookings                OK
nextcloud.oc_calendar_appt_configs                 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_circles_circle                        OK
nextcloud.oc_circles_event                         OK
nextcloud.oc_circles_member                        OK
nextcloud.oc_circles_membership                    OK
nextcloud.oc_circles_mount                         OK
nextcloud.oc_circles_mountpoint                    OK
nextcloud.oc_circles_remote                        OK
nextcloud.oc_circles_share_lock                    OK
nextcloud.oc_circles_token                         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_direct_edit                           OK
nextcloud.oc_directlink                            OK
nextcloud.oc_external_applicable                   OK
nextcloud.oc_external_config                       OK
nextcloud.oc_external_mounts                       OK
nextcloud.oc_external_options                      OK
nextcloud.oc_federated_reshares                    OK
nextcloud.oc_file_locks                            OK
nextcloud.oc_file_metadata                         OK
nextcloud.oc_filecache                             OK
nextcloud.oc_filecache_extended                    OK
nextcloud.oc_files_trash                           OK
nextcloud.oc_flow_checks                           OK
nextcloud.oc_flow_operations                       OK
nextcloud.oc_flow_operations_scope                 OK
nextcloud.oc_group_admin                           OK
nextcloud.oc_group_user                            OK
nextcloud.oc_groups                                OK
nextcloud.oc_jobs                                  OK
nextcloud.oc_known_users                           OK
nextcloud.oc_ldap_group_mapping                    OK
nextcloud.oc_ldap_group_members                    OK
nextcloud.oc_ldap_user_mapping                     OK
nextcloud.oc_login_flow_v2                         OK
nextcloud.oc_migrations                            OK
nextcloud.oc_mimetypes                             OK
nextcloud.oc_mounts                                OK
nextcloud.oc_music_albums                          OK
nextcloud.oc_music_ampache_sessions                OK
nextcloud.oc_music_ampache_users                   OK
nextcloud.oc_music_artists                         OK
nextcloud.oc_music_bookmarks                       OK
nextcloud.oc_music_cache                           OK
nextcloud.oc_music_genres                          OK
nextcloud.oc_music_playlists                       OK
nextcloud.oc_music_podcast_channels                OK
nextcloud.oc_music_podcast_episodes                OK
nextcloud.oc_music_radio_stations                  OK
nextcloud.oc_music_tracks                          OK
nextcloud.oc_notifications                         OK
nextcloud.oc_notifications_pushhash                OK
nextcloud.oc_notifications_settings                OK
nextcloud.oc_oauth2_access_tokens                  OK
nextcloud.oc_oauth2_clients                        OK
nextcloud.oc_ocsms_config                          OK
nextcloud.oc_ocsms_conversation_read_states        OK
nextcloud.oc_ocsms_sendmessage_queue               OK
nextcloud.oc_ocsms_smsdatas                        OK
nextcloud.oc_ocsms_user_datas                      OK
nextcloud.oc_preferences                           OK
nextcloud.oc_privacy_admins                        OK
nextcloud.oc_profile_config                        OK
nextcloud.oc_properties                            OK
nextcloud.oc_ratelimit_entries                     OK
nextcloud.oc_reactions                             OK
nextcloud.oc_recent_contact                        OK
nextcloud.oc_schedulingobjects                     OK
nextcloud.oc_share                                 OK
nextcloud.oc_share_external                        OK
nextcloud.oc_storages                              OK
nextcloud.oc_storages_credentials                  OK
nextcloud.oc_systemtag                             OK
nextcloud.oc_systemtag_group                       OK
nextcloud.oc_systemtag_object_mapping              OK
nextcloud.oc_text_documents                        OK
nextcloud.oc_text_sessions                         OK
nextcloud.oc_text_steps                            OK
nextcloud.oc_trusted_servers                       OK
nextcloud.oc_twofactor_backupcodes                 OK
nextcloud.oc_twofactor_providers                   OK
nextcloud.oc_user_status                           OK
nextcloud.oc_user_transfer_owner                   OK
nextcloud.oc_users                                 OK
nextcloud.oc_users_external                        OK
nextcloud.oc_vcategory                             OK
nextcloud.oc_vcategory_to_object                   OK
nextcloud.oc_webauthn                              OK
nextcloud.oc_whats_new                             OK
rainloop.rainloop_ab_contacts                      OK
rainloop.rainloop_ab_properties                    OK
rainloop.rainloop_system                           OK
rainloop.rainloop_users                            OK

Or, few seconds later:

# sudo mysqlcheck --all-databases
mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (111) when trying to connect

And, if I try a yunohost backup, I also got error messages related to this:
mysqldump: Got error: 2002: "Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (111)" when trying to connect

Impossible de sauvegarder nextcloud

I finally fixed it restoring backups of Nextcloud & Baikal.

I have the same problem: can't upgrade from 2022.10.3~ynh1 to 2022.11.2~ynh1 · Issue #152 · YunoHost-Apps/homeassistant_ynh · GitHub

Is there a other way than to restore the backup?