How to connect owncloud server to MariaDB hosted on another server?

Server configuration

Operating system: Ubuntu 22.04

**Database: 10.6.12-MariaDB-0ubuntu0.22.04.1 Ubuntu 22.04
**PHP version: PHP 7.4.33 (cli)
ownCloud version: (see ownCloud admin page)
**Updated from an older ownCloud or fresh install: Fresh Install
**Where did you install ownCloud from: CLI

Signing status (ownCloud 9.0 and above): Above

I am trying to connect Owncloud server installed on one server to the MariaDB server installed on another server.

I am trying to edit the config.php file but it gives me the below error:

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

I have done the below change to my config.php

‘datadirectory’ => ‘/var/www/owncloud/data’,
‘overwrite.cli.url’ => 'http:// localhost ',
‘dbtype’ => ‘mysql’, //I tried to change to MariaDB but does not work
‘version’ => ‘’,
‘dbname’ => ‘owncloud’,
‘dbhost’ => ‘196.168.XX.XX’, //this is the ip address of the dbhost
‘dbtableprefix’ => ‘oc_’,
‘mysql.utf8mb4’ => true,
‘dbuser’ => ‘owncloud’,
‘dbpassword’ => ‘XXXXXXXX’,

How do I connect my MariaDB installed on different server to the owncloud I have installed on one server? Could you please help?

Thanks and Regards,


i don’t think that changing this to MariaDB is correct and i think this needs to be kept as mysql.

1 Like

Did you check the logs? All these internal errors usually drop sufficient info there.

@tom42 is right, ‘dbtype’ is still ‘mysql’, even for MariaDB.

Are you certain that the MariaDB at 196.168.XX.XX in listening on port 3306 and is accepting your connects?