Upgrade 15.0.7 to 16.0.0 Issue

When I perform the manual upgrade instructions (which I’ve successfully completed multiple times before) to go from Nextcloud 15.0.7 to 16.0.0 I get the following error message after trying to run php occ upgrade:

www-data@raspberrypi:/var/www$ php occ upgrade
An unhandled exception has been thrown:
Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: could not find driver in /var/www/lib/private/DB/Connection.php:64
Stack trace:
#0 /var/www/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(448): OC\DB\Connection->connect()
#1 /var/www/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(410): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
#2 /var/www/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(354): Doctrine\DBAL\Connection->detectDatabasePlatform()
#3 /var/www/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(710): Doctrine\DBAL\Connection->getDatabasePlatform()
#4 /var/www/lib/private/DB/Connection.php(151): Doctrine\DBAL\Connection->setTransactionIsolation(2)
#5 /var/www/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/lib/private/DB/ConnectionFactory.php(158): Doctrine\DBAL\DriverManager::getConnection(Array, Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
#7 /var/www/lib/private/Server.php(640): OC\DB\ConnectionFactory->getConnection(‘mysql’, Array)
#8 /var/www/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC{closure}(Object(OC\Server))
#9 /var/www/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet(‘OCP\IDBConnecti…’)
#10 /var/www/lib/private/AppFramework/Utility/SimpleContainer.php(165): OC\ServerContainer->query(‘OCP\IDBConnecti…’)
#11 /var/www/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(OC\Server))
#12 /var/www/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet(‘DatabaseConnect…’)
#13 /var/www/lib/private/Server.php(1559): OC\ServerContainer->query(‘DatabaseConnect…’)
#14 /var/www/lib/private/Server.php(362): OC\Server->getDatabaseConnection()
#15 /var/www/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC{closure}(Object(OC\Server))
#16 /var/www/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet(‘OC\Authenticati…’)
#17 /var/www/lib/private/AppFramework/Utility/SimpleContainer.php(68): OC\ServerContainer->query(‘OC\Authenticati…’)
#18 /var/www/lib/private/AppFramework/Utility/SimpleContainer.php(98): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
#19 /var/www/lib/private/AppFramework/Utility/SimpleContainer.php(119): OC\AppFramework\Utility\SimpleContainer->resolve(‘OC\Authenticati…’)
#20 /var/www/lib/private/ServerContainer.php(150): OC\AppFramework\Utility\SimpleContainer->query(‘OC\Authenticati…’)
#21 /var/www/lib/private/AppFramework/Utility/SimpleContainer.php(68): OC\ServerContainer->query(‘OC\Authenticati…’)
#22 /var/www/lib/private/AppFramework/Utility/SimpleContainer.php(98): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
#23 /var/www/lib/private/AppFramework/Utility/SimpleContainer.php(119): OC\AppFramework\Utility\SimpleContainer->resolve(‘OC\Authenticati…’)
#24 /var/www/lib/private/ServerContainer.php(150): OC\AppFramework\Utility\SimpleContainer->query(‘OC\Authenticati…’)
#25 /var/www/lib/private/AppFramework/Utility/SimpleContainer.php(165): OC\ServerContainer->query(‘OC\Authenticati…’)
#26 /var/www/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(OC\Server))
#27 /var/www/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet(‘OC\Authenticati…’)
#28 /var/www/lib/private/Server.php(374): OC\ServerContainer->query(‘OC\Authenticati…’)
#29 /var/www/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC{closure}(Object(OC\Server))
#30 /var/www/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet(‘OC\User\Session’)
#31 /var/www/lib/private/AppFramework/Utility/SimpleContainer.php(165): OC\ServerContainer->query(‘OC\User\Session’)
#32 /var/www/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(OC\Server))
#33 /var/www/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet(‘UserSession’)
#34 /var/www/lib/private/Server.php(1435): OC\ServerContainer->query(‘UserSession’)
#35 /var/www/lib/private/Server.php(693): OC\Server->getUserSession()
#36 /var/www/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC{closure}(Object(OC\Server))
#37 /var/www/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet(‘OC\App\AppManag…’)
#38 /var/www/lib/private/AppFramework/Utility/SimpleContainer.php(165): OC\ServerContainer->query(‘OC\App\AppManag…’)
#39 /var/www/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(OC\Server))
#40 /var/www/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet(‘AppManager’)
#41 /var/www/lib/private/Server.php(1730): OC\ServerContainer->query(‘AppManager’)
#42 /var/www/lib/private/legacy/app.php(342): OC\Server->getAppManager()
#43 /var/www/lib/private/legacy/app.php(113): OC_App::getEnabledApps()
#44 /var/www/lib/base.php(640): OC_App::loadApps(Array)
#45 /var/www/lib/base.php(1056): OC::init()
#46 /var/www/console.php(46): require_once(’/var/www/lib/ba…’)
#47 /var/www/occ(11): require_once(’/var/www/consol…’)
#48 {main}PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: could not find driver in /var/www/lib/private/DB/Connection.php:64
Stack trace:
#0 /var/www/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(448): OC\DB\Connection->connect()
#1 /var/www/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(410): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
#2 /var/www/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(354): Doctrine\DBAL\Connection->detectDatabasePlatform()
#3 /var/www/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(710): Doctrine\DBAL\Connection->getDatabasePlatform()
#4 /var/www/lib/private/DB/Connection.php(151): Doctrine\DBAL\Connection->setTransactionIsolation(2)
#5 /var/www/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/lib/private/ in /var/www/lib/private/DB/Connection.php on line 64

I’ve read somewhere, that NC16.0 needs PHP 7.1 ?

I tried compiling php 7.3.4 (which I admit I’m fairly new at) and the error remained the same. After compiling, I rebooted the Raspberry Pi and ran php -v to verify that version 7.3.4 was in fact installed.

Are the required PHP modules installed as well?
A failing connection to the database can indicate that the mysql module is not loaded (not installed or not enabled yet).

I believe the correct module is “pdo_mysql”, but could be another one for, too. So please verify first, if that is indeed the correct module, if it is loaded already or if there is another mysql module already loaded.
grep -E "extension.*mysql" /etc/php/php.ini

Is there a leading ; before pdo_mysql or does it already look like:
extension=pdo_mysql

Schmu,
Thank you for helping me. You are pushing the limits of my understanding though. I believe the path of the file you are wanting me to look at is:
/etc/php/7.0/apache2/php.ini

Hm, it would be the correct path, but I thought you upgraded to PHP7.3?

i did, but to get it back to a working state, I restored it back to a working image.

Okay, could you run the following command then and provide the output here?
grep -RE "extension.*mysql" /etc/php/7.0/*

The database is currently running right? I think you can check that on your device with:
systemctl status mysqld

Sonstige Meldungen vom System? Irgendetwas, was mit DB-Zugriff und -problemen zu tun hat?
journalctl _SYSTEMD_UNIT=mysqld.service --since "4 hours ago" --no-pager

Hey Guys,

I followed this issue because I get exactly the same output as I was trying to update to NC 16.0.0.

I’m running on PHP7.2. My output on grep -RE "extension.*mysql" /etc/php/7.2/* is:

/etc/php/7.2/apache2/conf.d/10-mysqlnd.ini:extension=mysqlnd.so
/etc/php/7.2/apache2/conf.d/20-pdo_mysql.ini:extension=pdo_mysql.so
/etc/php/7.2/apache2/conf.d/20-mysqli.ini:extension=mysqli.so
/etc/php/7.2/apache2/php.ini:;   extension=mysqli
/etc/php/7.2/apache2/php.ini:;   extension=/path/to/extension/mysqli.so
/etc/php/7.2/apache2/php.ini:;extension=mysqli
/etc/php/7.2/apache2/php.ini:;extension=pdo_mysql
/etc/php/7.2/apache2/php.ini:; Records communication from all extensions using mysqlnd to the specified log
/etc/php/7.2/apache2/php.ini.ucf-dist:;   extension=mysqli
/etc/php/7.2/apache2/php.ini.ucf-dist:;   extension=/path/to/extension/mysqli.so
/etc/php/7.2/apache2/php.ini.ucf-dist:;extension=mysqli
/etc/php/7.2/apache2/php.ini.ucf-dist:;extension=pdo_mysql
/etc/php/7.2/apache2/php.ini.ucf-dist:; Records communication from all extensions using mysqlnd to the specified log
/etc/php/7.2/cli/conf.d/10-mysqlnd.ini:extension=mysqlnd.so
/etc/php/7.2/cli/conf.d/20-pdo_mysql.ini:extension=pdo_mysql.so
/etc/php/7.2/cli/conf.d/20-mysqli.ini:extension=mysqli.so
/etc/php/7.2/cli/php.ini:;   extension=mysqli
/etc/php/7.2/cli/php.ini:;   extension=/path/to/extension/mysqli.so
/etc/php/7.2/cli/php.ini:;extension=mysqli
/etc/php/7.2/cli/php.ini:;extension=pdo_mysql
/etc/php/7.2/cli/php.ini:; Records communication from all extensions using mysqlnd to the specified log
/etc/php/7.2/cli/php.ini.ucf-dist:;   extension=mysqli
/etc/php/7.2/cli/php.ini.ucf-dist:;   extension=/path/to/extension/mysqli.so
/etc/php/7.2/cli/php.ini.ucf-dist:;extension=mysqli
/etc/php/7.2/cli/php.ini.ucf-dist:;extension=pdo_mysql
/etc/php/7.2/cli/php.ini.ucf-dist:; Records communication from all extensions using mysqlnd to the specified log
/etc/php/7.2/fpm/conf.d/10-mysqlnd.ini:extension=mysqlnd.so
/etc/php/7.2/fpm/conf.d/20-pdo_mysql.ini:extension=pdo_mysql.so
/etc/php/7.2/fpm/conf.d/20-mysqli.ini:extension=mysqli.so
/etc/php/7.2/fpm/php.ini:;   extension=mysqli
/etc/php/7.2/fpm/php.ini:;   extension=/path/to/extension/mysqli.so
/etc/php/7.2/fpm/php.ini:;extension=mysqli
/etc/php/7.2/fpm/php.ini:;extension=pdo_mysql
/etc/php/7.2/fpm/php.ini:; Records communication from all extensions using mysqlnd to the specified log
/etc/php/7.2/fpm/php.ini.ucf-dist:;   extension=mysqli
/etc/php/7.2/fpm/php.ini.ucf-dist:;   extension=/path/to/extension/mysqli.so
/etc/php/7.2/fpm/php.ini.ucf-dist:;extension=mysqli
/etc/php/7.2/fpm/php.ini.ucf-dist:;extension=pdo_mysql
/etc/php/7.2/fpm/php.ini.ucf-dist:; Records communication from all extensions using mysqlnd to the specified log
/etc/php/7.2/mods-available/mysqli.ini:extension=mysqli.so
/etc/php/7.2/mods-available/pdo_mysql.ini:extension=pdo_mysql.so
/etc/php/7.2/mods-available/mysqlnd.ini:extension=mysqlnd.so

mysqld is already running and I get no entries about any other DB problems.

For completion I paste the output from trying to update:

Update of code successful.

Should the "occ upgrade" command be executed? [Y/n] Y
An unhandled exception has been thrown:
Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: could not find driver in /var/www/html/nextcloud/lib/private/DB/Connection.php:64
Stack trace:
#0 /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(448): OC\DB\Connection->connect()
#1 /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(410): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
#2 /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(354): Doctrine\DBAL\Connection->detectDatabasePlatform()
#3 /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(710): Doctrine\DBAL\Connection->getDatabasePlatform()
#4 /var/www/html/nextcloud/lib/private/DB/Connection.php(151): Doctrine\DBAL\Connection->setTransactionIsolation(2)
#5 /var/www/html/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/html/nextcloud/lib/private/DB/ConnectionFactory.php(156): Doctrine\DBAL\DriverManager::getConnection(Array, Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
#7 /var/www/html/nextcloud/lib/private/Server.php(640): OC\DB\ConnectionFactory->getConnection('mysql', Array)
#8 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server))
#9 /var/www/html/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('OCP\\IDBConnecti...')
#10 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(165): OC\ServerContainer->query('OCP\\IDBConnecti...')
#11 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server))
#12 /var/www/html/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('DatabaseConnect...')
#13 /var/www/html/nextcloud/lib/private/Server.php(1559): OC\ServerContainer->query('DatabaseConnect...')
#14 /var/www/html/nextcloud/lib/private/Server.php(362): OC\Server->getDatabaseConnection()
#15 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server))
#16 /var/www/html/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('OC\\Authenticati...')
#17 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(68): OC\ServerContainer->query('OC\\Authenticati...')
#18 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(98): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
#19 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(119): OC\AppFramework\Utility\SimpleContainer->resolve('OC\\Authenticati...')
#20 /var/www/html/nextcloud/lib/private/ServerContainer.php(150): OC\AppFramework\Utility\SimpleContainer->query('OC\\Authenticati...')
PHP Fatal error:  Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: could not find driver in /var/www/html/nextcloud/lib/private/DB/Connection.php:64
Stack trace:
#0 /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(448): OC\DB\Connection->connect()
#1 /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(410): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
#2 /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(354): Doctrine\DBAL\Connection->detectDatabasePlatform()
#3 /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(710): Doctrine\DBAL\Connection->getDatabasePlatform()
#4 /var/www/html/nextcloud/lib/private/DB/Connection.php(151): Doctrine\DBAL\Connection->setTransactionIsolation(2)
#5 /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(181): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOMySql\Dri in /var/www/html/nextcloud/lib/private/DB/Connection.php on line 64
#21 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(68): OC\ServerContainer->query('OC\\Authenticati...')
#22 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(98): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
#23 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(119): OC\AppFramework\Utility\SimpleContainer->resolve('OC\\Authenticati...')
#24 /var/www/html/nextcloud/lib/private/ServerContainer.php(150): OC\AppFramework\Utility\SimpleContainer->query('OC\\Authenticati...')
#25 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(165): OC\ServerContainer->query('OC\\Authenticati...')
#26 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server))
#27 /var/www/html/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('OC\\Authenticati...')
#28 /var/www/html/nextcloud/lib/private/Server.php(374): OC\ServerContainer->query('OC\\Authenticati...')
#29 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server))
#30 /var/www/html/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('OC\\User\\Session')
#31 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(165): OC\ServerContainer->query('OC\\User\\Session')
#32 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server))
#33 /var/www/html/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('UserSession')
#34 /var/www/html/nextcloud/lib/private/Server.php(1442): OC\ServerContainer->query('UserSession')
#35 /var/www/html/nextcloud/lib/private/Server.php(1031): OC\Server->getSession()
#36 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server))
#37 /var/www/html/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('OC\\Security\\CSR...')
#38 /var/www/html/nextcloud/lib/private/Server.php(1027): OC\ServerContainer->query('OC\\Security\\CSR...')
#39 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server))
#40 /var/www/html/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('CsrfTokenManage...')
#41 /var/www/html/nextcloud/lib/private/Server.php(1905): OC\ServerContainer->query('CsrfTokenManage...')
#42 /var/www/html/nextcloud/lib/private/Server.php(826): OC\Server->getCsrfTokenManager()
#43 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server))
#44 /var/www/html/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('OCP\\IRequest')
#45 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(165): OC\ServerContainer->query('OCP\\IRequest')
#46 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server))
#47 /var/www/html/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('Request')
#48 /var/www/html/nextcloud/lib/private/Server.php(1309): OC\ServerContainer->query('Request')
#49 /var/www/html/nextcloud/lib/private/Server.php(464): OC\Server->getRequest()
#50 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server))
#51 /var/www/html/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('OCP\\L10N\\IFacto...')
#52 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(165): OC\ServerContainer->query('OCP\\L10N\\IFacto...')
#53 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server))
#54 /var/www/html/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('L10NFactory')
#55 /var/www/html/nextcloud/lib/private/Server.php(1495): OC\ServerContainer->query('L10NFactory')
#56 /var/www/html/nextcloud/lib/private/Server.php(1506): OC\Server->getL10NFactory()
#57 /var/www/html/nextcloud/lib/base.php(234): OC\Server->getL10N('lib')
#58 /var/www/html/nextcloud/lib/base.php(645): OC::checkConfig()
#59 /var/www/html/nextcloud/lib/base.php(1056): OC::init()
#60 /var/www/html/nextcloud/console.php(46): require_once('/var/www/html/n...')
#61 /var/www/html/nextcloud/occ(11): require_once('/var/www/html/n...')
#62 {main}
Keep maintenance mode active? [y/N] n
An unhandled exception has been thrown:
Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: could not find driver in /var/www/html/nextcloud/lib/private/DB/Connection.php:64
Stack trace:
#0 /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(448): OC\DB\Connection->connect()
#1 /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(410): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
#2 /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(354): Doctrine\DBAL\Connection->detectDatabasePlatform()
#3 /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(710): Doctrine\DBAL\Connection->getDatabasePlatform()
#4 /var/www/html/nextcloud/lib/private/DB/Connection.php(151): Doctrine\DBAL\Connection->setTransactionIsolation(2)
#5 /var/www/html/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/html/nextcloud/lib/private/DB/ConnectionFactory.php(156): Doctrine\DBAL\DriverManager::getConnection(Array, Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
#7 /var/www/html/nextcloud/lib/private/Server.php(640): OC\DB\ConnectionFactory->getConnection('mysql', Array)
#8 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server))
#9 /var/www/html/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('OCP\\IDBConnecti...')
#10 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(165): OC\ServerContainer->query('OCP\\IDBConnecti...')
#11 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server))
#12 /var/www/html/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('DatabaseConnect...')
#13 /var/www/html/nextcloud/lib/private/Server.php(1559): OC\ServerContainer->query('DatabaseConnect...')
#14 /var/www/html/nextcloud/lib/private/Server.php(362): OC\Server->getDatabaseConnection()
#15 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server))
#16 /var/www/html/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('OC\\Authenticati...')
#17 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(68): OC\ServerContainer->query('OC\\Authenticati...')
#18 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(98): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
#19 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(119): OC\AppFramework\Utility\SimpleContainer->resolve('OC\\Authenticati...')
#20 /var/www/html/nextcloud/lib/private/ServerContainer.php(150): OC\AppFramework\Utility\SimpleContainer->query('OC\\Authenticati...')
#21 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(68): OC\ServerContainer->query('OC\\Authenticati...')
#22 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(98): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
#23 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(119): OC\AppFramework\Utility\SimpleContainer->resolve('OC\\Authenticati...')
#24 /var/www/html/nextcloud/lib/private/ServerContainer.php(150): OC\AppFramework\Utility\SimpleContainer->query('OC\\Authenticati...')
#25 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(165): OC\ServerContainer->query('OC\\Authenticati...')
#26 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server))
#27 /var/www/html/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('OC\\Authenticati...')
#28 /var/www/html/nextcloud/lib/private/Server.php(374): OC\ServerContainer->query('OC\\Authenticati...')
#29 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server))
#30 /var/www/html/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('OC\\User\\Session')
#31 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(165): OC\ServerContainer->query('OC\\User\\Session')
#32 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server))
#33 /var/www/html/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('UserSession')
#34 /var/www/html/nextcloud/lib/private/Server.php(1442): OC\ServerContainer->query('UserSession')
#35 /var/www/html/nextcloud/lib/private/Server.php(1031): OC\Server->getSession()
#36 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server))
#37 /var/www/html/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('OC\\Security\\CSR...')
#38 /var/www/html/nextcloud/lib/private/Server.php(1027): OC\ServerContainer->query('OC\\Security\\CSR...')
#39 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server))
#40 /var/www/html/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('CsrfTokenManage...')
#41 /var/www/html/nextcloud/lib/private/Server.php(1905): OC\ServerContainer->query('CsrfTokenManage...')
#42 /var/www/html/nextcloud/lib/private/Server.php(826): OC\Server->getCsrfTokenManager()
#43 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server))
#44 /var/www/html/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('OCP\\IRequest')
#45 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(165): OC\ServerContainer->query('OCP\\IRequest')
#46 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server))
#47 /var/www/html/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('Request')
#48 /var/www/html/nextcloud/lib/private/Server.php(1309): OC\ServerContainer->query('Request')
#49 /var/www/html/nextcloud/lib/private/Server.php(464): OC\Server->getRequest()
#50 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server))
#51 /var/www/html/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('OCP\\L10N\\IFacto...')
#52 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(165): OC\ServerContainer->query('OCP\\L10N\\IFacto...')
#53 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(OC\Server))
#54 /var/www/html/nextcloud/lib/private/ServerContainer.php(125): Pimple\Container->offsetGet('L10NFactory')
#55 /var/www/html/nextcloud/lib/private/Server.php(1495): OC\ServerContainer->query('L10NFactory')
#56 /var/www/html/nextcloud/lib/private/Server.php(1506): OC\Server->getL10NFactory()
#57 /var/www/html/nextcloud/lib/base.php(234): OC\Server->getL10N('lib')
#58 /var/www/html/nextcloud/lib/base.php(645): OC::checkConfig()
#59 /var/www/html/nextcloud/lib/base.php(1056): OC::init()
#60 /var/www/html/nextcloud/console.php(46): require_once('/var/www/html/n...')
#61 /var/www/html/nextcloud/occ(11): require_once('/var/www/html/n...')
PHP Fatal error:  Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: could not find driver in /var/www/html/nextcloud/lib/private/DB/Connection.php:64
Stack trace:
#0 /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(448): OC\DB\Connection->connect()
#1 /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(410): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
#2 /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(354): Doctrine\DBAL\Connection->detectDatabasePlatform()
#3 /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(710): Doctrine\DBAL\Connection->getDatabasePlatform()
#4 /var/www/html/nextcloud/lib/private/DB/Connection.php(151): Doctrine\DBAL\Connection->setTransactionIsolation(2)
#5 /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(181): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOMySql\Dri in /var/www/html/nextcloud/lib/private/DB/Connection.php on line 64
#62 {main}
Maintenance mode is disabled

Thanks for your help.

Okay, after an upgrade to PHP 7.3 there was an error with the php-redis-module. As I don’t use redis, I removed the package and tried to upgrade again and it works like a charm.