Hi, I’m facing a "connection refused error. It was after a database crash, and a (successful) restore from backup (other databases work again on this instance)
It happens always but an
occ command helps to debug
sudo -u nextcloud /usr/local/bin/php /usr/local/www/nextcloud/occ trashbin:expire An unhandled exception has been thrown: Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000]  Access denied for user 'nextcloud'@'localhost' to database 'nextcloud' in /usr/local/www/nextcloud/lib/private/DB/Connection.php:85
Excerpt from config file :
'dbtype' => 'mysql', 'version' => '188.8.131.52', 'overwrite.cli.url' => 'https://nextcloud.my.domain', 'dbname' => 'nextcloud', 'dbhost' => 'localhost', 'dbport' => '', 'dbtableprefix' => 'oc_', 'mysql.utf8mb4' => true, 'dbuser' => 'nextcloud', 'dbpassword' => '*****', 'installed' => true,
But, the password is valid ! I can connect to database with mysql CLI to this database.
$ mysql -unextcloud -p Enter password: (copy/pasted from config file) Welcome to the MariaDB monitor.
OS : FreeBSD 13
Apache : 2.4.48
PHP-FPM : 7.3.28
What is happening ?
Thanks for helping