MariaDB as Remote DB

Hi there,
I have DreamFactory installation on my server, version 1.8.1. I would like to connect to remote DB MariaDB version 5.5.34 on custom port 3310. When I created remote SQL DB I have got connection string “mysql:host=mariadb.myserver.com:3310;dbname=XYZ”.
But when I try to get data , I’ve got error: CDbConnection failed to open the DB connection.
Is mariadb supported, or I should use another connection string? I also tried dblib:… but with same error.

Thank you,
Rado.

Hello there,

MariaDB should indeed work fine with a normal MySQL connection string (that is, mysql: is fine). I believe you will need to specify the port using the port= parameter rather than using a colon and port number after the host value. Given your example, this would become:

mysql:host=mariadb.myserver.com;port=3310;dbname=XYZ;

I tested this on a remotely hosted MySQL DB of my own. The DB connection fails with host=hostname:port but works fine with host=hostname;port=port.

Please try using the port= parameter in your connection string, and let me know if that works.

Regards,
Jeffrey

Thank you very much, I didn’t see ‘port=’ directive in documentation. Now it works perfect!

Regards,
Rado

1 Like

Glad to hear it!

Here’s a link to the MySQL documentation’s connection string reference page. I recommend taking a look whenever you need to specify any non-standard values or generally edit your connection string.

http://dev.mysql.com/doc/connector-net/en/connector-net-connection-options.html