Error when trying to convery SQLite to SQL database

I’m getting the following error while running the conversion command after setting up the new database in mariadb:

pi@raspberrypi:/var/www/html/nextcloud $ mysql -u nc -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 35
Server version: 10.0.28-MariaDB-2+b1 Raspbian testing-staging

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> CREATE DATABASE nextclouddb1;
Query OK, 1 row affected (0.01 sec)

MariaDB [(none)]> \q
Bye
pi@raspberrypi:/var/www/html/nextcloud $ sudo -u www-data php occ db:convert-type --clear-schema mysql nc 127.0.0.1 nextclouddb1
What is the database password?

In Connection.php line 64:
                                                                                             
  Failed to connect to the database: An exception occurred in driver: could not find driver  
                                                                                             

db:convert-type [--port PORT] [--password PASSWORD] [--clear-schema] [--all-apps] [--chunk-size CHUNK-SIZE] [--] <type> <username> <hostname> <database>

Nextcloud version 16.0.4_:
Operating system and version Rasbian 10 on Raspberry Pi 4
Apache version 2.4.38:
PHP version (eg, 7.1):PHP 7.3.9-1~deb10u1

This is the first time I ran the command, any suggestions would be greatly appreciated.

It looks like you haven’t yet enabled the sqlite and/or mysql driver in your PHP configuration so tjat the PHP script cannot access one of the databases. Use the following command to check which modules have been installed and enabled:

php -m
1 Like

Here is the output, what is the module called that I’d need to install and how? Thank you for your assistance.

pi@raspberrypi:~ $ php -m
[PHP Modules]
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
json
libxml
mbstring
openssl
pcntl
pcre
PDO
pdo_sqlite
Phar
posix
readline
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

As you can see a PHP mysql module is not yet loaded. Here you will find a description what modes are required etc.:

1 Like

Thanks @j-ed installed all packages that were missing and the db is now converting.