PHP Fatal error (after restarting server running nextcloud)

Hi,

Everything was working with my nextcloud system until I rebooted.
Now when I connect via browser I get a 500 Internal Server Error.
Apache logs show:

[Thu Aug 10 16:06:58.335196 2017] [:error] [pid 1421] [client 162.158.75.25:14036] PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1045] Access denied for user ‘oc_nextcloud’@‘localhost’ (using password: YES) in /var/www/nextcloud/lib/private/DB/Connection.php:61\nStack trace:\n#0 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()\n#1 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()\n#2 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()\n#3 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlatform()\n#4 /var/www/nextcloud/lib/private/DB/Connection.php(148): Doctrine\DBAL\Connection->setTransactionIsolation(2)\n#5 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Obj in /var/www/nextcloud/lib/private/DB/Connection.php on line 61

I am not sure how to proceed from this.

VERSION: NextCloud-V12.0.0-IVCISA
OS: Ubuntu 16.04.02
(Amazon AMI: https://aws.amazon.com/marketplace/pp/B06ZZXYKWY)

You’ll need to look at your database, the error there states it can’t authenticate so while I can’t tell you why it has happened, getting into mySQL and granting an account the permissions to access the db is the way forward.

1 Like

The mysql user oc_nextcloud couldn’t connect to the mysql server.

You should type mysql -u oc_nextcloud -p

And see if you can connect that way