After updating my Nextcloud 15 installation to version 15.0.5, it cannot connect to the database anymore. In the apache error.log I see this error:
PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver:
could not find driver 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(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(151): Doctrine\DBAL\Connection->setTransactionIsolation(2)\n#5 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172):
OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Configura in /var/www/nextcloud/lib/private/DB/Connection.php on line 64
I’m using PHP 7.2.16 on Ubuntu 18.04.2 with MySQL 5.7.25. The MySQL server is up and running, I’ve checked this already. The database also is there.
What could be wrong?
PHP Fatal error: … could not find driver
This question has already been asked
and answered several times in this forum. It would be worse to search the forum first before opening a new request.
This is definitely not a problem of Nextcloud but your PHP configuration. Make sure that the required database module is correctly loaded so that the database can be accessed again.
I have searched before and read a couple of threads. Before opening this thread I have searched for about 2 hours on Google and in this forum. I did not come across the solution. That’s why I opened this thread.
Interesting, the following search criteria led me in the right direction within seconds:
As mentioned before, make sure that you required PHP mysql module is correctly loaded.