Failed to connect to the database, MiraDB problem

Hi all,
I have a problem with my nextcloudpi. The login web page of my nextcloud instance is now empty.
The problem is related to the acces to the miraDB.
Can you help me ?
Here is the output of ncp-report command
<–! Paste this in GitHub report -->

NextCloudPi diagnostics

NextCloudPi version  v1.18.0
NextCloudPi image    NextCloudPi_01-14-19
distribution         Raspbian GNU/Linux 10 \n \l
automount            yes
USB devices          sda
datadir              /media/NC_USERS_DATA/ncdata
data in SD           no
data filesystem      ext2/ext3
data disk usage      5.9G/80G
rootfs usage         2.6G/29G
swapfile             /media/NC_USERS_DATA/swap
dbdir                /var/lib/mysql
Nextcloud check      error
HTTPD service        up
PHP service          up
MariaDB service      down
Redis service        up
Postfix service      up
internet check       ok
port check 80        open
port check 443       open
IP                   ***REMOVED SENSITIVE VALUE***
gateway              ***REMOVED SENSITIVE VALUE***
interface            eth0
certificates         ***REMOVED SENSITIVE VALUE***
NAT loopback         no
uptime               13:38

Nextcloud configuration

An unhandled exception has been thrown:
Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused in /var/www/nextcloud/lib/private/DB/Connection.php:64
Stack trace:
#0 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(448): OC\DB\Connection->connect()
#1 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(410): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
#2 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(354): Doctrine\DBAL\Connection->detectDatabasePlatform()
#3 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(710): Doctrine\DBAL\Connection->getDatabasePlatform()
#4 /var/www/nextcloud/lib/private/DB/Connection.php(151): Doctrine\DBAL\Connection->setTransactionIsolation(2)
#5 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(181): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
#6 /var/www/nextcloud/lib/private/DB/ConnectionFactory.php(156): Doctrine\DBAL\DriverManager::getConnection(Array, Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
#7 /var/www/nextcloud/lib/private/Server.php(641): OC\DB\ConnectionFactory->getConnection('mysql', Array)
#8 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server))
#9 /var/www/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('OCP\\IDBConnecti...')
#10 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(165): OC\ServerContainer->query('OCP\\IDBConnecti...')
#11 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server))
#12 /var/www/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('DatabaseConnect...')
#13 /var/www/nextcloud/lib/private/Server.php(1560): OC\ServerContainer->query('DatabaseConnect...')
#14 /var/www/nextcloud/lib/private/Server.php(362): OC\Server->getDatabaseConnection()
#15 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server))
#16 /var/www/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('OC\\Authenticati...')
#17 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(68): OC\ServerContainer->query('OC\\Authenticati...')
#18 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(98): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
#19 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(119): OC\AppFramework\Utility\SimpleContainer->resolve('OC\\Authenticati...')
#20 /var/www/nextcloud/lib/private/ServerContainer.php(150): OC\AppFramework\Utility\SimpleContainer->query('OC\\Authenticati...')
#21 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(68): OC\ServerContainer->query('OC\\Authenticati...')
#22 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(98): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
#23 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(119): OC\AppFramework\Utility\SimpleContainer->resolve('OC\\Authenticati...')
#24 /var/www/nextcloud/lib/private/ServerContainer.php(150): OC\AppFramework\Utility\SimpleContainer->query('OC\\Authenticati...')
#25 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(165): OC\ServerContainer->query('OC\\Authenticati...')
#26 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server))
#27 /var/www/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('OC\\Authenticati...')
#28 /var/www/nextcloud/lib/private/Server.php(374): OC\ServerContainer->query('OC\\Authenticati...')
#29 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server))
#30 /var/www/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('OC\\User\\Session')
#31 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(165): OC\ServerContainer->query('OC\\User\\Session')
#32 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server))
#33 /var/www/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('UserSession')
#34 /var/www/nextcloud/lib/private/Server.php(1436): OC\ServerContainer->query('UserSession')
#35 /var/www/nextcloud/lib/private/Server.php(694): OC\Server->getUserSession()
#36 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server))
#37 /var/www/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('OC\\App\\AppManag...')
#38 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(165): OC\ServerContainer->query('OC\\App\\AppManag...')
#39 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server))
#40 /var/www/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('AppManager')
#41 /var/www/nextcloud/lib/private/Server.php(1731): OC\ServerContainer->query('AppManager')
#42 /var/www/nextcloud/lib/private/legacy/app.php(343): OC\Server->getAppManager()
#43 /var/www/nextcloud/lib/private/legacy/app.php(114): OC_App::getEnabledApps()
#44 /var/www/nextcloud/lib/base.php(640): OC_App::loadApps(Array)
#45 /var/www/nextcloud/lib/base.php(1056): OC::init()
#46 /var/www/nextcloud/console.php(46): require_once('/var/www/nextcl...')
#47 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#48 {main}
HTTPd logs

[Thu Nov 28 00:00:01.402856 2019] [ssl:warn] [pid 856:tid 1992679952] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Thu Nov 28 00:00:01.405286 2019] [mpm_event:notice] [pid 856:tid 1992679952] AH00489: Apache/2.4.38 (Raspbian) OpenSSL/1.1.1c configured -- resuming normal operations
[Thu Nov 28 00:00:01.405359 2019] [core:notice] [pid 856:tid 1992679952] AH00094: Command line: '/usr/sbin/apache2'

Database logs

Resource Limits:
Limit                     Soft Limit           Hard Limit           Units
Max cpu time              unlimited            unlimited            seconds
Max file size             unlimited            unlimited            bytes
Max data size             unlimited            unlimited            bytes
Max stack size            8388608              unlimited            bytes
Max core file size        0                    unlimited            bytes
Max resident set          unlimited            unlimited            bytes
Max processes             7732                 7732                 processes
Max open files            16364                16364                files
Max locked memory         65536                65536                bytes
Max address space         unlimited            unlimited            bytes
Max file locks            unlimited            unlimited            locks
Max pending signals       7732                 7732                 signals
Max msgqueue size         819200               819200               bytes
Max nice priority         0                    0
Max realtime priority     0                    0
Max realtime timeout      unlimited            unlimited            us
Core pattern: core


Nextcloud logs

{"reqId":"aoC7Tc0G0FmsYZr4lQ2i","level":1,"time":"2019-09-21T16:10:43+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::info: Repair info: No need to repair pending cron jobs.","userAgent":"--","version":"16.0.3.0"}
{"reqId":"aoC7Tc0G0FmsYZr4lQ2i","level":1,"time":"2019-09-21T16:10:43+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Extract the vcard uid and store it in the db","userAgent":"--","version":"16.0.3.0"}
{"reqId":"aoC7Tc0G0FmsYZr4lQ2i","level":1,"time":"2019-09-21T16:10:43+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Cleanup invalid photocache files for carddav","userAgent":"--","version":"16.0.3.0"}
{"reqId":"aoC7Tc0G0FmsYZr4lQ2i","level":1,"time":"2019-09-21T16:10:43+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Add background job to cleanup login flow v2 tokens","userAgent":"--","version":"16.0.3.0"}
{"reqId":"aoC7Tc0G0FmsYZr4lQ2i","level":1,"time":"2019-09-21T16:10:43+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Remove potentially over exposing share links","userAgent":"--","version":"16.0.3.0"}
{"reqId":"aoC7Tc0G0FmsYZr4lQ2i","level":1,"time":"2019-09-21T16:10:43+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::info: Repair info: No need to remove link shares.","userAgent":"--","version":"16.0.3.0"}
{"reqId":"aoC7Tc0G0FmsYZr4lQ2i","level":1,"time":"2019-09-21T16:10:43+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Cleanup cypress files from viewer app","userAgent":"--","version":"16.0.3.0"}
{"reqId":"aoC7Tc0G0FmsYZr4lQ2i","level":1,"time":"2019-09-21T16:10:58+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::startCheckCodeIntegrity: Starting code integrity check...","userAgent":"--","version":"16.0.3.0"}
{"reqId":"aoC7Tc0G0FmsYZr4lQ2i","level":1,"time":"2019-09-21T16:11:12+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::finishedCheckCodeIntegrity: Finished code integrity check","userAgent":"--","version":"16.0.3.0"}
{"reqId":"aoC7Tc0G0FmsYZr4lQ2i","level":1,"time":"2019-09-21T16:11:14+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::updateEnd: Update successful","userAgent":"--","version":"16.0.4.1"}
{"reqId":"aoC7Tc0G0FmsYZr4lQ2i","level":1,"time":"2019-09-21T16:11:22+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::maintenanceDisabled: Turned off maintenance mode","userAgent":"--","version":"16.0.4.1"}
{"reqId":"aoC7Tc0G0FmsYZr4lQ2i","level":1,"time":"2019-09-21T16:11:22+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::resetLogLevel: Reset log level to Warning(2)","userAgent":"--","version":"16.0.4.1"}
{"reqId":"XZZnWMpKqlDkOIkAS3rpmgAAAAU","level":3,"time":"2019-10-03T21:25:45+00:00","remoteAddr":"94.107.170.52","user":"tebra","app":"no app in context","method":"PUT","url":"\/remote.php\/dav\/uploads\/tebra\/d104cb10ada9eb5d91f75b14090fe35e\/0000000000000000-0000000007921949","message":{"Exception":"Sabre\\DAV\\Exception\\BadRequest","Message":"expected filesize 7921949 got 2531328","Code":0,"Trace":[{"file":"\/var\/www\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/Directory.php","line":156,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":[null]},{"file":"\/var\/www\/nextcloud\/apps\/dav\/lib\/Upload\/UploadFolder.php","line":45,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["0000000000000000-0000000007921949",null]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":1096,"function":"createFile","class":"OCA\\DAV\\Upload\\UploadFolder","type":"->","args":["0000000000000000-0000000007921949",null]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php","line":525,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["uploads\/tebra\/d104cb10ada9eb5d91f75b14090fe35e\/0000000000000000-0000000007921949",null,null]},{"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"absoluteUrl":"https:\/\/jl-j.duckdns.org\/remote.php\/dav\/uploads\/tebra\/d104cb10ada9eb5d91f75b14090fe35e\/0000000000000000-0000000007921949","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"__class__":"Sabre\\DAV\\CorePlugin"},"httpPut"],[{"absoluteUrl":"https:\/\/jl-j.duckdns.org\/remote.php\/dav\/uploads\/tebra\/d104cb10ada9eb5d91f75b14090fe35e\/0000000000000000-0000000007921949","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":479,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["method:PUT",[{"absoluteUrl":"https:\/\/jl-j.duckdns.org\/remote.php\/dav\/uploads\/tebra\/d104cb10ada9eb5d91f75b14090fe35e\/0000000000000000-0000000007921949","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":254,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"absoluteUrl":"https:\/\/jl-j.duckdns.org\/remote.php\/dav\/uploads\/tebra\/d104cb10ada9eb5d91f75b14090fe35e\/0000000000000000-0000000007921949","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/var\/www\/nextcloud\/apps\/dav\/lib\/Server.php","line":316,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"\/var\/www\/nextcloud\/apps\/dav\/appinfo\/v2\/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"\/var\/www\/nextcloud\/remote.php","line":163,"args":["\/var\/www\/nextcloud\/apps\/dav\/appinfo\/v2\/remote.php"],"function":"require_once"}],"File":"\/var\/www\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/File.php","Line":228,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (Android) Nextcloud-android\/3.8.0","version":"16.0.4.1"}
{"reqId":"XZZnWMpKqlDkOIkAS3rpmgAAAAU","level":4,"time":"2019-10-03T21:25:45+00:00","remoteAddr":"94.107.170.52","user":"tebra","app":"webdav","method":"PUT","url":"\/remote.php\/dav\/uploads\/tebra\/d104cb10ada9eb5d91f75b14090fe35e\/0000000000000000-0000000007921949","message":{"Exception":"Sabre\\DAV\\Exception\\BadRequest","Message":"expected filesize 7921949 got 2531328","Code":0,"Trace":[{"file":"\/var\/www\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/Directory.php","line":156,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":[null]},{"file":"\/var\/www\/nextcloud\/apps\/dav\/lib\/Upload\/UploadFolder.php","line":45,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["0000000000000000-0000000007921949",null]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":1096,"function":"createFile","class":"OCA\\DAV\\Upload\\UploadFolder","type":"->","args":["0000000000000000-0000000007921949",null]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php","line":525,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["uploads\/tebra\/d104cb10ada9eb5d91f75b14090fe35e\/0000000000000000-0000000007921949",null,null]},{"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"absoluteUrl":"https:\/\/jl-j.duckdns.org\/remote.php\/dav\/uploads\/tebra\/d104cb10ada9eb5d91f75b14090fe35e\/0000000000000000-0000000007921949","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"__class__":"Sabre\\DAV\\CorePlugin"},"httpPut"],[{"absoluteUrl":"https:\/\/jl-j.duckdns.org\/remote.php\/dav\/uploads\/tebra\/d104cb10ada9eb5d91f75b14090fe35e\/0000000000000000-0000000007921949","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":479,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["method:PUT",[{"absoluteUrl":"https:\/\/jl-j.duckdns.org\/remote.php\/dav\/uploads\/tebra\/d104cb10ada9eb5d91f75b14090fe35e\/0000000000000000-0000000007921949","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":254,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"absoluteUrl":"https:\/\/jl-j.duckdns.org\/remote.php\/dav\/uploads\/tebra\/d104cb10ada9eb5d91f75b14090fe35e\/0000000000000000-0000000007921949","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/var\/www\/nextcloud\/apps\/dav\/lib\/Server.php","line":316,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"\/var\/www\/nextcloud\/apps\/dav\/appinfo\/v2\/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"\/var\/www\/nextcloud\/remote.php","line":163,"args":["\/var\/www\/nextcloud\/apps\/dav\/appinfo\/v2\/remote.php"],"function":"require_once"}],"File":"\/var\/www\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/File.php","Line":228,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (Android) Nextcloud-android\/3.8.0","version":"16.0.4.1"}
{"reqId":"XdYI4OPLusrrt3j1UDYH9QAAAFQ","level":2,"time":"2019-11-21T03:47:44+00:00","remoteAddr":"144.91.75.56","user":"--","app":"core","method":"GET","url":"\/00156500000.cfg","message":"Login failed: 'PlcmSpIp' (Remote IP: '144.91.75.56')","userAgent":"python-requests\/2.6.0 CPython\/2.7.5 Linux\/3.10.0-1062.1.1.el7.x86_64","version":"16.0.4.1"}
{"reqId":"XdYI8uPLusrrt3j1UDYH9wAAAFY","level":2,"time":"2019-11-21T03:48:02+00:00","remoteAddr":"144.91.75.56","user":"--","app":"core","method":"GET","url":"\/00156500000.cfg","message":"Login failed: 'PlcmSpIp' (Remote IP: '144.91.75.56')","userAgent":"python-requests\/2.6.0 CPython\/2.7.5 Linux\/3.10.0-1062.1.1.el7.x86_64","version":"16.0.4.1"}
{"reqId":"XdYJFePLusrrt3j1UDYH@QAAAEM","level":2,"time":"2019-11-21T03:48:38+00:00","remoteAddr":"144.91.75.56","user":"--","app":"core","method":"GET","url":"\/00156500000.cfg","message":"Login failed: 'PlcmSpIp' (Remote IP: '144.91.75.56')","userAgent":"python-requests\/2.6.0 CPython\/2.7.5 Linux\/3.10.0-1062.1.1.el7.x86_64","version":"16.0.4.1"}
{"reqId":"XdYJWOPLusrrt3j1UDYH@wAAAEA","level":2,"time":"2019-11-21T03:49:45+00:00","remoteAddr":"144.91.75.56","user":"--","app":"core","method":"GET","url":"\/00156500000.cfg","message":"Login failed: 'PlcmSpIp' (Remote IP: '144.91.75.56')","userAgent":"python-requests\/2.6.0 CPython\/2.7.5 Linux\/3.10.0-1062.1.1.el7.x86_64","version":"16.0.4.1"}
{"reqId":"XdYJ4OPLusrrt3j1UDYIAQAAAFM","level":2,"time":"2019-11-21T03:52:02+00:00","remoteAddr":"144.91.75.56","user":"--","app":"core","method":"GET","url":"\/00156500000.cfg","message":"Login failed: 'PlcmSpIp' (Remote IP: '144.91.75.56')","userAgent":"python-requests\/2.6.0 CPython\/2.7.5 Linux\/3.10.0-1062.1.1.el7.x86_64","version":"16.0.4.1"}
{"reqId":"XdYLFePLusrrt3j1UDYIFAAAAFU","level":2,"time":"2019-11-21T03:57:12+00:00","remoteAddr":"144.91.75.56","user":"--","app":"core","method":"GET","url":"\/00156500000.cfg","message":"Login failed: 'PlcmSpIp' (Remote IP: '144.91.75.56')","userAgent":"python-requests\/2.6.0 CPython\/2.7.5 Linux\/3.10.0-1062.1.1.el7.x86_64","version":"16.0.4.1"}

More info from command
sudo systemctl status mariadb.service
● mariadb.service - MariaDB 10.3.15 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset:
Drop-In: /etc/systemd/system/mariadb.service.d
└─ncp-delay-automount.conf
Active: activating (auto-restart) (Result: signal) since Thu 2019-11-28 11:29
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Process: 21075 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/r
Process: 21076 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_STAR
Process: 21078 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VA
Process: 21246 ExecStartPre=/bin/sleep 20 (code=exited, status=0/SUCCESS)
Process: 21248 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_W
Main PID: 21248 (code=killed, signal=ABRT)
Status: “Starting final batch to recover 52 pages from redo log”

What is Bad magic header in tc log ?

2019-11-28 13:06:49 0 [Warning] The parameter innodb_file_format is deprecated and has no effect. It may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
2019-11-28 13:06:49 0 [Note] InnoDB: Using Linux native AIO
2019-11-28 13:06:49 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-11-28 13:06:49 0 [Note] InnoDB: Uses event mutexes
2019-11-28 13:06:49 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-11-28 13:06:49 0 [Note] InnoDB: Number of pools: 1
2019-11-28 13:06:49 0 [Note] InnoDB: Using generic crc32 instructions
2019-11-28 13:06:49 0 [Note] InnoDB: Initializing buffer pool, total size = 512M, instances = 1, chunk size = 128M
2019-11-28 13:06:49 0 [Note] InnoDB: Completed initialization of buffer pool
2019-11-28 13:06:49 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priorit y can be changed. See the man page of setpriority().
2019-11-28 13:06:49 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=2006463161
2019-11-28 13:06:50 0 [Note] InnoDB: Starting final batch to recover 52 pages from redo log.
2019-11-28 13:06:51 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2019-11-28 13:06:51 0 [Note] InnoDB: Removed temporary tablespace data file: “ibtmp1”
2019-11-28 13:06:51 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2019-11-28 13:06:51 0 [Note] InnoDB: Setting file ‘./ibtmp1’ size to 12 MB. Physically writing the file full ; Please wait …
2019-11-28 13:06:51 0 [Note] InnoDB: File ‘./ibtmp1’ size is now 12 MB.
2019-11-28 13:06:51 0 [Note] InnoDB: 10.3.15 started; log sequence number 2006498713; transaction id 1583929 0
2019-11-28 13:06:51 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2019-11-28 13:06:51 0 [Note] Plugin ‘FEEDBACK’ is disabled.
2019-11-28 13:06:51 0 [Note] Recovering after a crash using tc.log
2019-11-28 13:06:51 0 [ERROR] Bad magic header in tc log
2019-11-28 13:06:51 0 [ERROR] Crash recovery failed. Either correct the problem (if it’s, for example, out o f memory error) and restart, or delete tc log and start mysqld with --tc-heuristic-recover={commit|rollback}
2019-11-28 13:06:51 0 [ERROR] Can’t init tc log
2019-11-28 13:06:51 0 [ERROR] Aborting

2019-11-28 13:06:51 0x3c2f83e0 InnoDB: Assertion failure in file /build/mariadb-10.3-eeOY7l/mariadb-10.3-10 .3.15/storage/innobase/btr/btr0cur.cc line 311
InnoDB: Failing assertion: btr_page_get_next( latch_leaves.blocks[0]->frame, mtr) == page_get_page_no(page)
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to https://jira.mariadb.org/
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: https://mariadb.com/kb/en/library/innodb-recovery-modes/
InnoDB: about forcing recovery.
191128 13:06:51 [ERROR] mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.

We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

Server version: 10.3.15-MariaDB-1
key_buffer_size=16777216
read_buffer_size=131072
max_used_connections=0
max_threads=153
thread_count=5
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 351527 K bytes of memory
Hope that’s ok; if not, decrease some variables in the equation.

Thread pointer: 0x6c300848
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong…
stack_bottom = 0x3c2f7d34 thread_stack 0x30000

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x0):
Connection ID (thread ID): 3
Status: NOT_KILLED

Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on, index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on ,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_matc h_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off, outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bk a=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equali ties=on,condition_pushdown_for_derived=on,split_materialized=on

Writing a core file…
Working directory at /var/lib/mysql
Resource Limits:
Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited seconds
Max file size unlimited unlimited bytes
Max data size unlimited unlimited bytes
Max stack size 8388608 unlimited bytes
Max core file size 0 unlimited bytes
Max resident set unlimited unlimited bytes
Max processes 7732 7732 processes
Max open files 16364 16364 files
Max locked memory 65536 65536 bytes
Max address space unlimited unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 7732 7732 signals
Max msgqueue size 819200 819200 bytes
Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout unlimited unlimited us
Core pattern: core

Try to remove the tc.log:

rm /var/lib/mysql/tc.log
systemctl restart mariadb

It’s not uncommon that after non-graceful service stop/crash this breaks service start. See also: https://jira.mariadb.org/plugins/servlet/mobile#issue/MDEV-16442

1 Like

Thank you for your answer.
Here is the output after deletting tc.log and restarting mariadb :
Job for mariadb.service failed because a fatal signal was delivered to the control process. See "systemctl status mariadb.service" and "journalctl -xe" for details.
This is the output of systemctl status mariadb.service
● mariadb.service - MariaDB 10.3.15 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─ncp-delay-automount.conf
Active: activating (start-pre) since Thu 2019-11-28 19:06:06 GMT; 10s ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Process: 25521 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Process: 25522 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 25524 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=/usr/bin/galera_recovery; [ $? -eq 0 ]
Cntrl PID: 25692 (sleep)
Tasks: 1 (limit: 2319)
Memory: 1.0M
CGroup: /system.slice/mariadb.service
└─25692 /bin/sleep 20
Nov 28 18:48:35 nextcloudpi systemd[1]: Starting MariaDB 10.3.15 database server…

And output of journalctl -xe
Nov 28 18:54:31 nextcloudpi systemd[1]: mariadb.service: Main process exited, code=killed, status=6/ABRT
– Subject: Unit process exited
– Defined-By: systemd
Nov 28 18:54:08 nextcloudpi systemd[1]: Stopped Register Current IP as Nextcloud trusted domain.
– Subject: A stop job for unit nextcloud-domain.service has finished
– Defined-By: systemd
– A stop job for unit nextcloud-domain.service has finished.
– The job identifier is 460778 and the job result is done.
Nov 28 18:54:29 nextcloudpi mysqld[19469]: 2019-11-28 18:54:29 0 [Note] /usr/sbin/mysqld (mysqld 10.3.15-MariaDB-1) starting as proces
Nov 28 18:54:31 nextcloudpi systemd[1]: mariadb.service: Main process exited, code=killed, status=6/ABRT
– Subject: Unit process exited
– Defined-By: systemd
– An ExecStart= process belonging to unit mariadb.service has exited.
– The process’ exit code is ‘killed’ and its exit status is 6.
Nov 28 18:54:31 nextcloudpi systemd[1]: mariadb.service: Failed with result ‘signal’.
– Subject: Unit failed
– Defined-By: systemd
– The unit mariadb.service has entered the ‘failed’ state with result ‘signal’.
Nov 28 18:54:31 nextcloudpi systemd[1]: Failed to start MariaDB 10.3.15 database server.
– Subject: A start job for unit mariadb.service has failed

Hmm that was the usual way to fix this tc.log related issues. I was thinking that probably the file is still required, hence cleared instead of deleted, but searching through the forum leads quickly to many results where deleting it worked well.

I guess there is another issue. Could you paste the following:

journalctl -u mariadb | tail -20
tail -20 /var/log/mysql/error.log

Pease wrap code and pastes into code syntax (a ``` before and after the paste), so it’s better readable.

Thanks again for your help
This is the output of journalctl -u mariadb | tail -20

Nov 28 20:10:33 nextcloudpi systemd[1]: mariadb.service: Scheduled restart job, restart counter is at 203.
Nov 28 20:10:33 nextcloudpi systemd[1]: Stopped MariaDB 10.3.15 database server.
Nov 28 20:10:33 nextcloudpi systemd[1]: Starting MariaDB 10.3.15 database server...
Nov 28 20:10:54 nextcloudpi mysqld[27088]: 2019-11-28 20:10:54 0 [Note] /usr/sbin/mysqld (mysqld 10.3.15-MariaDB-1) starting as process 27088 ...
Nov 28 20:10:55 nextcloudpi systemd[1]: mariadb.service: Main process exited, code=killed, status=6/ABRT
Nov 28 20:10:55 nextcloudpi systemd[1]: mariadb.service: Failed with result 'signal'.
Nov 28 20:10:55 nextcloudpi systemd[1]: Failed to start MariaDB 10.3.15 database server.
Nov 28 20:11:00 nextcloudpi systemd[1]: mariadb.service: Service RestartSec=5s expired, scheduling restart.
Nov 28 20:11:00 nextcloudpi systemd[1]: mariadb.service: Scheduled restart job, restart counter is at 204.
Nov 28 20:11:00 nextcloudpi systemd[1]: Stopped MariaDB 10.3.15 database server.
Nov 28 20:11:00 nextcloudpi systemd[1]: Starting MariaDB 10.3.15 database server...
Nov 28 20:11:22 nextcloudpi mysqld[27343]: 2019-11-28 20:11:22 0 [Note] /usr/sbin/mysqld (mysqld 10.3.15-MariaDB-1) starting as process 27343 ...
Nov 28 20:11:23 nextcloudpi systemd[1]: mariadb.service: Main process exited, code=killed, status=6/ABRT
Nov 28 20:11:23 nextcloudpi systemd[1]: mariadb.service: Failed with result 'signal'.
Nov 28 20:11:23 nextcloudpi systemd[1]: Failed to start MariaDB 10.3.15 database server.
Nov 28 20:11:28 nextcloudpi systemd[1]: mariadb.service: Service RestartSec=5s expired, scheduling restart.
Nov 28 20:11:28 nextcloudpi systemd[1]: mariadb.service: Scheduled restart job, restart counter is at 205.
Nov 28 20:11:28 nextcloudpi systemd[1]: Stopped MariaDB 10.3.15 database server.
Nov 28 20:11:28 nextcloudpi systemd[1]: Starting MariaDB 10.3.15 database server... ```

And this is the output of cat /var/log/mysql/error.log
```Max realtime timeout      unlimited            unlimited            us        
Core pattern: core

2019-11-28 20:16:24 0 [Warning] The parameter innodb_file_format is deprecated and has no effect. It may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
2019-11-28 20:16:24 0 [Note] InnoDB: Using Linux native AIO
2019-11-28 20:16:24 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-11-28 20:16:24 0 [Note] InnoDB: Uses event mutexes
2019-11-28 20:16:24 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-11-28 20:16:24 0 [Note] InnoDB: Number of pools: 1
2019-11-28 20:16:24 0 [Note] InnoDB: Using generic crc32 instructions
2019-11-28 20:16:24 0 [Note] InnoDB: Initializing buffer pool, total size = 512M, instances = 1, chunk size = 128M
2019-11-28 20:16:24 0 [Note] InnoDB: Completed initialization of buffer pool
2019-11-28 20:16:24 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2019-11-28 20:16:25 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=2006463161
2019-11-28 20:16:25 0 [Note] InnoDB: Starting final batch to recover 52 pages from redo log.
pi@nextcloudpi:~$ sudo tail -100 /var/log/mysql/error.log
2019-11-28 20:16:52 0 [Note] InnoDB: Uses event mutexes
2019-11-28 20:16:52 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-11-28 20:16:52 0 [Note] InnoDB: Number of pools: 1
2019-11-28 20:16:52 0 [Note] InnoDB: Using generic crc32 instructions
2019-11-28 20:16:52 0 [Note] InnoDB: Initializing buffer pool, total size = 512M, instances = 1, chunk size = 128M
2019-11-28 20:16:52 0 [Note] InnoDB: Completed initialization of buffer pool
2019-11-28 20:16:52 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2019-11-28 20:16:52 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=2006463161
2019-11-28 20:16:52 0 [Note] InnoDB: Starting final batch to recover 52 pages from redo log.
2019-11-28 20:16:53 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2019-11-28 20:16:53 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2019-11-28 20:16:53 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2019-11-28 20:16:53 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2019-11-28 20:16:53 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2019-11-28 20:16:53 0 [Note] InnoDB: 10.3.15 started; log sequence number 2006498713; transaction id 15839290
2019-11-28 20:16:53 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2019-11-28 20:16:53 0 [Note] Plugin 'FEEDBACK' is disabled.
2019-11-28 20:16:53 0 [Note] Recovering after a crash using tc.log
2019-11-28 20:16:53 0 [Note] Starting crash recovery...
2019-11-28 20:16:53 0 [Note] Crash recovery finished.
2019-11-28 20:16:53 0x3cbf93e0  InnoDB: Assertion failure in file /build/mariadb-10.3-eeOY7l/mariadb-10.3-10.3.15/storage/innobase/btr/btr0cur.cc line 311
InnoDB: Failing assertion: btr_page_get_next( latch_leaves.blocks[0]->frame, mtr) == page_get_page_no(page)
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to https://jira.mariadb.org/
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: https://mariadb.com/kb/en/library/innodb-recovery-modes/
InnoDB: about forcing recovery.
191128 20:16:53 [ERROR] mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.

To report this bug, see https://mariadb.com/kb/en/reporting-bugs

We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed, 
something is definitely wrong and this may fail.

Server version: 10.3.15-MariaDB-1
key_buffer_size=16777216
read_buffer_size=131072
max_used_connections=0
max_threads=153
thread_count=5
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 351527 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x6c400848
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x3cbf8d34 thread_stack 0x30000

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x0): 
Connection ID (thread ID): 4
Status: NOT_KILLED

Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on

The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
Writing a core file...
Working directory at /var/lib/mysql
Resource Limits:
Limit                     Soft Limit           Hard Limit           Units     
Max cpu time              unlimited            unlimited            seconds   
Max file size             unlimited            unlimited            bytes     
Max data size             unlimited            unlimited            bytes     
Max stack size            8388608              unlimited            bytes     
Max core file size        0                    unlimited            bytes     
Max resident set          unlimited            unlimited            bytes     
Max processes             7732                 7732                 processes 
Max open files            16364                16364                files     
Max locked memory         65536                65536                bytes     
Max address space         unlimited            unlimited            bytes     
Max file locks            unlimited            unlimited            locks     
Max pending signals       7732                 7732                 signals   
Max msgqueue size         819200               819200               bytes     
Max nice priority         0                    0                    
Max realtime priority     0                    0                    
Max realtime timeout      unlimited            unlimited            us        
Core pattern: core

2019-11-28 20:17:19 0 [Warning] The parameter innodb_file_format is deprecated and has no effect. It may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/

Well… this doesn’t look too good… the most probable cause is a corruption in your database. If you’re MariaDB is running on your sd card, then I’d urge you to reconsider this, since I have already seen a lot of sd cards going south, when operating a databases on it.

Your best bet would be to save your MariaDB library folder and then trying to utilize some of the recovery modes, which are lined out on the page mentioned in the error.log. You might be lucky and get the DB operational again, but I wouldn’t count on it, since once MariaDB/MySQL hits this state, if quite often the end for that particular DB.

Another word of advise… running regular (and daily, that is) dumps of your NC DB is mandantory, when operating the DB on a sd card - the risk is simply too high. If you can setup the same version on MariaDB elsewhere, e.g. in VM then I’d try to do the recovery over there.

1 Like

I move my nextcloud user data to external USB drive but the DB was still on sd card.
I did not seen any read/write error on system log. So maybe my DB si not yet completly corrupted.
Here is the output of ls -l /var/lib/mysql/nextcloud/

-rw-rw---- 1 mysql mysql       67 Jan 14  2019 db.opt
-rw-rw---- 1 mysql mysql     1210 Jan 14  2019 oc_accounts.frm
-rw-rw---- 1 mysql mysql    65536 Feb  7  2019 oc_accounts.ibd
-rw-rw---- 1 mysql mysql    40517 Jan 14  2019 oc_activity.frm
-rw-rw---- 1 mysql mysql    90112 Feb  1  2019 oc_activity.ibd
-rw-rw---- 1 mysql mysql    23033 Jan 14  2019 oc_activity_mq.frm
-rw-rw---- 1 mysql mysql    73728 Jan 14  2019 oc_activity_mq.ibd
-rw-rw---- 1 mysql mysql     2557 Jan 14  2019 oc_addressbookchanges.frm
-rw-rw---- 1 mysql mysql    65536 Nov  6 08:06 oc_addressbookchanges.ibd
-rw-rw---- 1 mysql mysql     5643 Jan 14  2019 oc_addressbooks.frm
-rw-rw---- 1 mysql mysql    65536 Nov  6 08:06 oc_addressbooks.ibd
-rw-rw---- 1 mysql mysql     2354 Jan 14  2019 oc_appconfig.frm
-rw-rw---- 1 mysql mysql    65536 Nov 26 23:15 oc_appconfig.ibd
-rw-rw---- 1 mysql mysql     4670 Jan 14  2019 oc_authtoken.frm
-rw-rw---- 1 mysql mysql   188416 Nov 26 23:20 oc_authtoken.ibd
-rw-rw---- 1 mysql mysql     1001 Apr 11  2019 oc_bookmarks_folders_bookmarks.frm
-rw-rw---- 1 mysql mysql   131072 Apr 17  2019 oc_bookmarks_folders_bookmarks.ibd
-rw-rw---- 1 mysql mysql    18177 Apr 11  2019 oc_bookmarks_folders.frm
-rw-rw---- 1 mysql mysql    65536 Apr 11  2019 oc_bookmarks_folders.ibd
-rw-rw---- 1 mysql mysql    51048 Apr 11  2019 oc_bookmarks.frm
-rw-rw---- 1 mysql mysql   204800 Apr 17  2019 oc_bookmarks.ibd
-rw-rw---- 1 mysql mysql     1978 Feb  1  2019 oc_bookmarks_tags.frm
-rw-rw---- 1 mysql mysql    65536 Apr 17  2019 oc_bookmarks_tags.ibd
-rw-rw---- 1 mysql mysql     5351 Jan 14  2019 oc_bruteforce_attempts.frm
-rw-rw---- 1 mysql mysql    65536 Nov 21 03:57 oc_bruteforce_attempts.ibd
-rw-rw---- 1 mysql mysql     2588 Jan 14  2019 oc_calendarchanges.frm
-rw-rw---- 1 mysql mysql   155648 Nov 24 11:11 oc_calendarchanges.ibd
-rw-rw---- 1 mysql mysql     5941 Jan 14  2019 oc_calendar_invitations.frm
-rw-rw---- 1 mysql mysql    65536 Jan 14  2019 oc_calendar_invitations.ibd
-rw-rw---- 1 mysql mysql     4008 Jan 14  2019 oc_calendarobjects.frm
-rw-rw---- 1 mysql mysql  6291456 Nov 24 11:11 oc_calendarobjects.ibd
-rw-rw---- 1 mysql mysql     4107 Jan 14  2019 oc_calendarobjects_props.frm
-rw-rw---- 1 mysql mysql   450560 Nov 24 11:11 oc_calendarobjects_props.ibd
-rw-rw---- 1 mysql mysql    21100 Jan 14  2019 oc_calendar_resources.frm
-rw-rw---- 1 mysql mysql    73728 Jan 14  2019 oc_calendar_resources.ibd
-rw-rw---- 1 mysql mysql    21100 Jan 14  2019 oc_calendar_rooms.frm
-rw-rw---- 1 mysql mysql    73728 Jan 14  2019 oc_calendar_rooms.ibd
-rw-rw---- 1 mysql mysql     7086 Jan 14  2019 oc_calendars.frm
-rw-rw---- 1 mysql mysql    65536 Nov 24 11:11 oc_calendars.ibd
-rw-rw---- 1 mysql mysql     5298 Jan 14  2019 oc_calendarsubscriptions.frm
-rw-rw---- 1 mysql mysql    65536 Nov 23 05:15 oc_calendarsubscriptions.ibd
-rw-rw---- 1 mysql mysql     3797 Aug 18 18:15 oc_cards.frm
-rw-rw---- 1 mysql mysql  5242880 Nov  6 08:06 oc_cards.ibd
-rw-rw---- 1 mysql mysql     4309 Aug 18 18:15 oc_cards_properties.frm
-rw-rw---- 1 mysql mysql   212992 Nov  6 08:06 oc_cards_properties.ibd
-rw-rw---- 1 mysql mysql     2799 Aug 18 18:12 oc_collres_accesscache.frm
-rw-rw---- 1 mysql mysql    73728 Nov 21 11:15 oc_collres_accesscache.ibd
-rw-rw---- 1 mysql mysql     1205 Aug 18 18:12 oc_collres_collections.frm
-rw-rw---- 1 mysql mysql    65536 Aug 18 18:12 oc_collres_collections.ibd
-rw-rw---- 1 mysql mysql     1512 Aug 18 18:12 oc_collres_resources.frm
-rw-rw---- 1 mysql mysql    65536 Aug 18 18:12 oc_collres_resources.ibd
-rw-rw---- 1 mysql mysql     4541 Jan 14  2019 oc_comments.frm
-rw-rw---- 1 mysql mysql    81920 Jan 14  2019 oc_comments.ibd
-rw-rw---- 1 mysql mysql     2280 Jan 14  2019 oc_comments_read_markers.frm
-rw-rw---- 1 mysql mysql    65536 Jan 14  2019 oc_comments_read_markers.ibd
-rw-rw---- 1 mysql mysql     1994 Jan 14  2019 oc_credentials.frm
-rw-rw---- 1 mysql mysql    65536 Nov 26 23:20 oc_credentials.ibd
-rw-rw---- 1 mysql mysql     4622 Jan 14  2019 oc_dav_shares.frm
-rw-rw---- 1 mysql mysql    65536 Jan 14  2019 oc_dav_shares.ibd
-rw-rw---- 1 mysql mysql     2520 Jan 14  2019 oc_directlink.frm
-rw-rw---- 1 mysql mysql    65536 Jan 14  2019 oc_directlink.ibd
-rw-rw---- 1 mysql mysql     2745 Feb  1  2019 oc_external_applicable.frm
-rw-rw---- 1 mysql mysql    73728 Nov 26 22:46 oc_external_applicable.ibd
-rw-rw---- 1 mysql mysql    18633 Feb  1  2019 oc_external_config.frm
-rw-rw---- 1 mysql mysql    65536 Nov 26 22:47 oc_external_config.ibd
-rw-rw---- 1 mysql mysql     2109 Feb  1  2019 oc_external_mounts.frm
-rw-rw---- 1 mysql mysql    65536 Nov 26 22:46 oc_external_mounts.ibd
-rw-rw---- 1 mysql mysql     3272 Feb  1  2019 oc_external_options.frm
-rw-rw---- 1 mysql mysql    65536 Nov 26 22:47 oc_external_options.ibd
-rw-rw---- 1 mysql mysql      988 Jan 14  2019 oc_federated_reshares.frm
-rw-rw---- 1 mysql mysql    65536 Jan 14  2019 oc_federated_reshares.ibd
-rw-rw---- 1 mysql mysql    22638 Jan 14  2019 oc_filecache.frm
-rw-rw---- 1 mysql mysql 12582912 Nov 26 23:20 oc_filecache.ibd
-rw-rw---- 1 mysql mysql     2233 Jan 14  2019 oc_file_locks.frm
-rw-rw---- 1 mysql mysql    65536 Apr 17  2019 oc_file_locks.ibd
-rw-rw---- 1 mysql mysql     6931 Jan 14  2019 oc_files_trash.frm
-rw-rw---- 1 mysql mysql    90112 Nov 20 15:44 oc_files_trash.ibd
-rw-rw---- 1 mysql mysql     2737 Jan 14  2019 oc_flow_checks.frm
-rw-rw---- 1 mysql mysql    65536 Jan 14  2019 oc_flow_checks.ibd
-rw-rw---- 1 mysql mysql     3094 Jan 14  2019 oc_flow_operations.frm
-rw-rw---- 1 mysql mysql    65536 Jan 14  2019 oc_flow_operations.ibd
-rw-rw---- 1 mysql mysql     1944 Jan 14  2019 oc_group_admin.frm
-rw-rw---- 1 mysql mysql    65536 Jan 14  2019 oc_group_admin.ibd
-rw-rw---- 1 mysql mysql     1176 Jan 14  2019 oc_groups.frm
-rw-rw---- 1 mysql mysql    65536 Jan 14  2019 oc_groups.ibd
-rw-rw---- 1 mysql mysql     1944 Jan 14  2019 oc_group_user.frm
-rw-rw---- 1 mysql mysql    65536 Jan 14  2019 oc_group_user.ibd
-rw-rw---- 1 mysql mysql    18625 Jan 14  2019 oc_jobs.frm
-rw-rw---- 1 mysql mysql    73728 Nov 26 23:20 oc_jobs.ibd
-rw-rw---- 1 mysql mysql    11908 Aug 18 18:12 oc_login_flow_v2.frm
-rw-rw---- 1 mysql mysql    73728 Aug 18 18:12 oc_login_flow_v2.ibd
-rw-rw---- 1 mysql mysql     2987 Jan 14  2019 oc_migrations.frm
-rw-rw---- 1 mysql mysql    65536 Aug 18 18:14 oc_migrations.ibd
-rw-rw---- 1 mysql mysql     2462 Jan 14  2019 oc_mimetypes.frm
-rw-rw---- 1 mysql mysql    65536 Nov 26 21:40 oc_mimetypes.ibd
-rw-rw---- 1 mysql mysql    19776 Jan 14  2019 oc_mounts.frm
-rw-rw---- 1 mysql mysql    90112 Nov 26 22:45 oc_mounts.ibd
-rw-rw---- 1 mysql mysql     4118 Jan 14  2019 oc_news_feeds.frm
-rw-rw---- 1 mysql mysql    81920 Jan 14  2019 oc_news_feeds.ibd
-rw-rw---- 1 mysql mysql     3235 Jan 14  2019 oc_news_folders.frm
-rw-rw---- 1 mysql mysql    73728 Jan 14  2019 oc_news_folders.ibd
-rw-rw---- 1 mysql mysql     3907 Jan 14  2019 oc_news_items.frm
-rw-rw---- 1 mysql mysql    81920 Jan 14  2019 oc_news_items.ibd
-rw-rw---- 1 mysql mysql     2884 Jan 14  2019 oc_notes_meta.frm
-rw-rw---- 1 mysql mysql    73728 Jan 14  2019 oc_notes_meta.ibd
-rw-rw---- 1 mysql mysql    36671 Jan 14  2019 oc_notifications.frm
-rw-rw---- 1 mysql mysql   114688 Nov 26 21:29 oc_notifications.ibd
-rw-rw---- 1 mysql mysql     6139 Jan 14  2019 oc_notifications_pushtokens.frm
-rw-rw---- 1 mysql mysql    65536 Jan 14  2019 oc_notifications_pushtokens.ibd
-rw-rw---- 1 mysql mysql     5682 Jan 14  2019 oc_oauth2_access_tokens.frm
-rw-rw---- 1 mysql mysql    65536 Jan 14  2019 oc_oauth2_access_tokens.ibd
-rw-rw---- 1 mysql mysql    10297 Aug 18 18:13 oc_oauth2_clients.frm
-rw-rw---- 1 mysql mysql    65536 Aug 18 18:13 oc_oauth2_clients.ibd
-rw-rw---- 1 mysql mysql     1658 Jan 14  2019 oc_preferences.frm
-rw-rw---- 1 mysql mysql    65536 Nov 26 22:49 oc_preferences.ibd
-rw-rw---- 1 mysql mysql     1997 Jan 14  2019 oc_preview_generation.frm
-rw-rw---- 1 mysql mysql    81920 Nov 26 20:45 oc_preview_generation.ibd
-rw-rw---- 1 mysql mysql     1208 Aug 18 18:14 oc_privacy_admins.frm
-rw-rw---- 1 mysql mysql    65536 Aug 18 18:14 oc_privacy_admins.ibd
-rw-rw---- 1 mysql mysql     3843 Jan 14  2019 oc_properties.frm
-rw-rw---- 1 mysql mysql    65536 Mar 27  2019 oc_properties.ibd
-rw-rw---- 1 mysql mysql     3278 Jan 14  2019 oc_schedulingobjects.frm
-rw-rw---- 1 mysql mysql    65536 Jan 14  2019 oc_schedulingobjects.ibd
-rw-rw---- 1 mysql mysql    21979 Jan 14  2019 oc_share_external.frm
-rw-rw---- 1 mysql mysql    65536 Jan 14  2019 oc_share_external.ibd
-rw-rw---- 1 mysql mysql    13324 Jan 14  2019 oc_share.frm
-rw-rw---- 1 mysql mysql   106496 Nov 21 11:15 oc_share.ibd
-rw-rw---- 1 mysql mysql     1766 Jan 14  2019 oc_storages.frm
-rw-rw---- 1 mysql mysql    65536 Nov 26 22:47 oc_storages.ibd
-rw-rw---- 1 mysql mysql     1752 Jan 14  2019 oc_systemtag.frm
-rw-rw---- 1 mysql mysql     1977 Jan 14  2019 oc_systemtag_group.frm
-rw-rw---- 1 mysql mysql    65536 Jan 14  2019 oc_systemtag_group.ibd
-rw-rw---- 1 mysql mysql    65536 Jan 14  2019 oc_systemtag.ibd
-rw-rw---- 1 mysql mysql     1504 Jan 14  2019 oc_systemtag_object_mapping.frm
-rw-rw---- 1 mysql mysql    65536 Jan 14  2019 oc_systemtag_object_mapping.ibd
-rw-rw---- 1 mysql mysql     8416 Jan 14  2019 oc_trusted_servers.frm
-rw-rw---- 1 mysql mysql    65536 Jan 14  2019 oc_trusted_servers.ibd
-rw-rw---- 1 mysql mysql     2257 Jan 14  2019 oc_twofactor_backupcodes.frm
-rw-rw---- 1 mysql mysql    65536 Feb  1  2019 oc_twofactor_backupcodes.ibd
-rw-rw---- 1 mysql mysql     1850 Aug 18 18:15 oc_twofactor_providers.frm
-rw-rw---- 1 mysql mysql    65536 Aug 18 18:15 oc_twofactor_providers.ibd
-rw-rw---- 1 mysql mysql     1794 Aug 18 18:13 oc_twofactor_totp_secrets.frm
-rw-rw---- 1 mysql mysql    65536 Nov 26 22:45 oc_twofactor_totp_secrets.ibd
-rw-rw---- 1 mysql mysql     3286 Jan 14  2019 oc_users.frm
-rw-rw---- 1 mysql mysql    65536 Feb  1  2019 oc_users.ibd
-rw-rw---- 1 mysql mysql     3999 Jan 14  2019 oc_vcategory.frm
-rw-rw---- 1 mysql mysql    73728 Jan 14  2019 oc_vcategory.ibd
-rw-rw---- 1 mysql mysql     1733 Jan 14  2019 oc_vcategory_to_object.frm
-rw-rw---- 1 mysql mysql    65536 Jan 14  2019 oc_vcategory_to_object.ibd
-rw-rw---- 1 mysql mysql     2528 Aug 18 18:15 oc_whats_new.frm
-rw-rw---- 1 mysql mysql    65536 Aug 18 18:15 oc_whats_new.ibd```
Do you have any advise or howto use recovery mode ?

Depending on the traffic and workload of your NC instance, MariaDB probably causes more stress to the sd card, than your files. On a sd card it’s always about change. The DB engine writes continously to its files and this is what kills the sd card in the end.

However, take a look at this page MariaDB Recovery Modes and see if you can get a good dump from your DB. If you succeed, you can remove your database and import the dump and be fine.

Agree, that looks like corrupted database which not means corrupted file system necessarily, but the latter could have been the cause of the prior. Since dmesg is not boot persistent you might not see the fs error anymore. However, the initial database crash, which lead to service start breaking tc.log could have been the database corruption cause already.

Jep generally persistent databases should never be stored on SDcard. Note that the single database table file can be completely rewritten on any access and e.g. the oc_filescache can easily take hundreds of MiB. Best is to boot the whole system from external drive, e.g. possible on RPi3, or otherwise move the root file system there and keep only the boot partition on SDcard. Those are not made for 24/7 write access to be true.
AFAIK NextCloudPi has some GUI option to do that?

I use instructions on this page to restore my Miradb https://iserversupport.com/recover-crashed-innodb-tables-on-mysql-database-server/

See here

● mariadb.service - MariaDB 10.3.15 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─ncp-delay-automount.conf
   Active: active (running) since Mon 2019-12-02 11:14:56 GMT; 17min ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
 Main PID: 1165 (mysqld)
   Status: "Taking your SQL requests now..."
    Tasks: 33 (limit: 2319)
   Memory: 70.8M
   CGroup: /system.slice/mariadb.service
           └─1165 /usr/sbin/mysqld

Dec 02 11:13:46 nextcloudpi systemd[1]: Starting MariaDB 10.3.15 database server...
Dec 02 11:14:52 nextcloudpi mysqld[1165]: 2019-12-02 11:14:52 0 [Note] /usr/sbin/mysqld (mysqld 10.3.15-MariaDB-1) starting as process 1165 ...
Dec 02 11:14:56 nextcloudpi /etc/mysql/debian-start[1245]: Upgrading MySQL tables if necessary.
Dec 02 11:14:56 nextcloudpi systemd[1]: Started MariaDB 10.3.15 database server.
Dec 02 11:14:56 nextcloudpi /etc/mysql/debian-start[1249]: /usr/bin/mysql_upgrade: the '--basedir' option is always ignored
Dec 02 11:14:56 nextcloudpi /etc/mysql/debian-start[1249]: Looking for 'mysql' as: /usr/bin/mysql
Dec 02 11:14:56 nextcloudpi /etc/mysql/debian-start[1249]: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
Dec 02 11:14:56 nextcloudpi /etc/mysql/debian-start[1249]: This installation of MySQL is already upgraded to 10.3.15-MariaDB, use --force if you still need
Dec 02 11:14:56 nextcloudpi /etc/mysql/debian-start[1300]: Checking for insecure root accounts.

But now I have this message on my nextcloud login page:


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.

Check the log file for any entries pointing to the root cause of the problem.

This is the nc-error.log

[Mon Dec 02 11:10:05.876711 2019] [proxy_fcgi:error] [pid 24030:tid 1579111456] [client 94.107.170.52:53674] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught Doctrine\\DBAL\\DBALException: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2002] No such file or directory in /var/www/nextcloud/lib/private/DB/Connection.php:64\nStack trace:\n#0 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(448): OC\\DB\\Connection->connect()\n#1 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(410): Doctrine\\DBAL\\Connection->getDatabasePlatformVersion()\n#2 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(354): Doctrine\\DBAL\\Connection->detectDatabasePlatform()\n#3 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(710): Doctrine\\DBAL\\Connection->getDatabasePlatform()\n#4 /var/www/nextcloud/lib/private/DB/Connection.php(151): Doctrine\\DBAL\\Connection->setTransactionIsolation(2)\n#5 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(181): OC\\DB\\Connection->__construct(Array, Objec...PHP message: PHP Fatal error:  Uncaught Doctrine\\DBAL\\DBALException: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2002] No such file or directory in /var/www/nextcloud/lib/private/DB/Connection.php:64\nStack trace:\n#0 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(448): OC\\DB\\Connection->connect()\n#1 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(410): Doctrine\\DBAL\\Connection->getDatabasePlatformVersion()\n#2 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(354): Doctrine\\DBAL\\Connection->detectDatabasePlatform()\n#3 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(710): Doctrine\\DBAL\\Connection->getDatabasePlatform()\n#4 /var/www/nextcloud/lib/private/DB/Connection.php(151): Doctrine\\DBAL\\Connection->setTransactionIsolation(2)\n#5 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(181): OC\\DB\\Connection->__construct(Array, Objec...'

this is the error.log in apache2 directory

[Mon Dec 02 00:00:01.430339 2019] [ssl:warn] [pid 858:tid 1992901136] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Mon Dec 02 00:00:01.440095 2019] [mpm_event:notice] [pid 858:tid 1992901136] AH00489: Apache/2.4.38 (Raspbian) OpenSSL/1.1.1c configured -- resuming normal operations
[Mon Dec 02 00:00:01.440193 2019] [core:notice] [pid 858:tid 1992901136] AH00094: Command line: '/usr/sbin/apache2'
[Mon Dec 02 11:13:29.167503 2019] [mpm_event:notice] [pid 858:tid 1992901136] AH00491: caught SIGTERM, shutting down
[Mon Dec 02 11:13:49.877144 2019] [ssl:warn] [pid 537:tid 1992839696] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Mon Dec 02 11:13:49.942932 2019] [ssl:warn] [pid 823:tid 1992839696] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Mon Dec 02 11:13:49.949670 2019] [mpm_event:notice] [pid 823:tid 1992839696] AH00489: Apache/2.4.38 (Raspbian) OpenSSL/1.1.1c configured -- resuming normal operations
[Mon Dec 02 11:13:49.949814 2019] [core:notice] [pid 823:tid 1992839696] AH00094: Command line: '/usr/sbin/apache2'

SQLSTATE[HY000] [2002] No such file or directory

Can you please provide the database settings from the Nextcloud config.php file. They’re all starting with ‘db…’ (don’t show you original username and password :wink:)

Here is my config.php

<?php
$CONFIG = array (
  'passwordsalt' => '***',
  'secret' => '***',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    5 => 'nextcloudpi.local',
    7 => 'nextcloudpi',
    8 => 'nextcloudpi.lan',
    1 => '192.168.1.236',
    4 => '---',
    11 => '---',
  ),
  'datadirectory' => '/media/NC_USERS_DATA/ncdata',
  'dbtype' => 'mysql',
  'version' => '16.0.4.1',
  'overwrite.cli.url' => '---',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'ncadmin',
  'dbpassword' => '***',
  'installed' => true,
  'instanceid' => '***',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
    'password' => '***',
  ),
  'tempdirectory' => '/media/NC_USERS_DATA/ncdata/tmp',
  'mail_smtpmode' => 'sendmail',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_from_address' => 'admin',
  'mail_domain' => '---',
  'overwriteprotocol' => 'https',
  'maintenance' => false,
  'logfile' => '/media/NC_USERS_DATA/ncdata/nextcloud.log',
  'loglevel' => '2',
  'log_type' => 'file',
  'mail_sendmailmode' => 'pipe',
  'jpeg_quality' => '60',
);

I replace domaine by — and password by *** for obvious reasons.

You should set the parameter to the port on which your database is accepting connections or you force the 'dbhost' parameter to use a socket to communicate with the database, like e.g.

'dbhost' => 'localhost:/run/mysql/mysql.sock',

Don’t works
How to know my mysdl.sock path ?

ok it is ```
/run/mysql/mysqld.sock

I find the problem. My nextcloud DB was empty because I badly import it from my backup.
Now my nextcloud installation works again.
Thanks all to your support.