Problem: Converting database type sqlite --> mysql

Hi everyone,

so I updated to v15.0.2 getting the hint to convert database since I am using sqlite. Trying to do that in two different way, I get two different show stoppers.

Being in directory /var/www/html/nextcloud:

1. Using this command: php occ db:convert-type --all-apps mysql myusername 127.0.0.1 nc_database

–> An unhandled exception has been thrown:
Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred while executing ‘PRAGMA journal_mode = WAL’:

SQLSTATE[HY000]: General error: 14 unable to open database file 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(992): OC\DB\Connection->connect()
#1 /var/www/html/nextcloud/lib/private/DB/Connection.php(216): Doctrine\DBAL\Connection->executeUpdate(‘PRAGMA read_unc…’, Array, Array)
#2 /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): OC\DB\Connection->executeUpdate(‘PRAGMA read_unc…’)
#3 /var/www/html/nextcloud/lib/private/DB/Connection.php(151): Doctrine\DBAL\Connection->setTransactionIsolation(2)
#4 /var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOSqlite\Driver), Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
#5 /var/www/html/nextcloud/lib/private/DB/ConnectionFactory.php(158): Doctrine\DBAL\DriverManager::getConnection(Array, Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
#6 /var/www/html/nextcloud/lib/private/Server.php(641): OC\DB\ConnectionFactory->getConnection(‘sqlite3’, Array)
#7 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC{closure}(Object(OC\Server))
#8 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(117): Pimple\Container->offsetGet(‘OCP\IDBConnecti…’)
#9 /var/www/html/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query(‘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/AppFramework/Utility/SimpleContainer.php(117): Pimple\Container->offsetGet(‘DatabaseConnect…’)
#13 /var/www/html/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query(‘DatabaseConnect…’)
#14 /var/www/html/nextcloud/lib/private/Server.php(1552): OC\ServerContainer->query(‘DatabaseConnect…’)
#15 /var/www/html/nextcloud/lib/private/Server.php(360): OC\Server->getDatabaseConnection()
#16 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC{closure}(Object(OC\Server))
#17 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(117): Pimple\Container->offsetGet(‘OC\Authenticati…’)
#18 /var/www/html/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query(‘OC\Authenticati…’)
#19 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(68): OC\ServerContainer->query(‘OC\Authenticati…’)
#20 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(98): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
#21 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(119): OC\AppFramework\Utility\SimpleContainer->resolve(‘OC\Authenticati…’)
#22 /var/www/html/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query(‘OC\Authenticati…’)
#23 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(68): OC\ServerContainer->query(‘OC\Authenticati…’)
#24 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(98): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
#25 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(119): OC\AppFramework\Utility\SimpleContainer->resolve(‘OC\Authenticati…’)
#26 /var/www/html/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query(‘OC\Authenticati…’)
#27 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(165): OC\ServerContainer->query(‘OC\Authenticati…’)
#28 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(OC\Server))
#29 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(117): Pimple\Container->offsetGet(‘OC\Authenticati…’)
#30 /var/www/html/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query(‘OC\Authenticati…’)
#31 /var/www/html/nextcloud/lib/private/Server.php(372): OC\ServerContainer->query(‘OC\Authenticati…’)
#32 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC{closure}(Object(OC\Server))
#33 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(117): Pimple\Container->offsetGet(‘OC\User\Session’)
#34 /var/www/html/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query(‘OC\User\Session’)
#35 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(165): OC\ServerContainer->query(‘OC\User\Session’)
#36 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(OC\Server))
#37 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(117): Pimple\Container->offsetGet(‘UserSession’)
#38 /var/www/html/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query(‘UserSession’)
#39 /var/www/html/nextcloud/lib/private/Server.php(1428): OC\ServerContainer->query(‘UserSession’)
#40 /var/www/html/nextcloud/lib/private/Server.php(694): OC\Server->getUserSession()
#41 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC{closure}(Object(OC\Server))
#42 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(117): Pimple\Container->offsetGet(‘OC\App\AppManag…’)
#43 /var/www/html/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query(‘OC\App\AppManag…’)
#44 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(165): OC\ServerContainer->query(‘OC\App\AppManag…’)
#45 /var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(OC\Server))
#46 /var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(117): Pimple\Container->offsetGet(‘AppManager’)
#47 /var/www/html/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query(‘AppManager’)
#48 /var/www/html/nextcloud/lib/private/Server.php(1723): OC\ServerContainer->query(‘AppManager’)
#49 /var/www/html/nextcloud/lib/private/legacy/app.php(342): OC\Server->getAppManager()
#50 /var/www/html/nextcloud/lib/private/legacy/app.php(113): OC_App::getEnabledApps()
#51 /var/www/html/nextcloud/lib/base.php(654): OC_App::loadApps(Array)
#52 /var/www/html/nextcloud/lib/base.php(1068): OC::init()
#53 /var/www/html/nextcloud/console.php(46): require_once(’/var/www/html/n…’)
#54 /var/www/html/nextcloud/occ(11): require_once(’/var/www/html/n…’)

2. Using this command: sudo -u www-data php occ db:convert-type --all-apps mysql myusername 127.0.0.1 nc_database

–> What is the database password? What password? I don not have a sqlite db password.

In Connection.php line 64:

Failed to connect to the database: An exception occured in driver: could not find driver

db:convert-type [–port PORT] [–password PASSWORD] [–clear-schema] [–all-apps] [–chunk-size CHUNK-SIZE] [–]

Can you help? There is no post in this forum or the www as I searched to help me out. Or I am just to blind to handle.

Thank you in advance.