Connection string for MariaDB using ODBC

Posted on

Question :

What is the connection string for using MariaDB with ODBC?

I’m guessing it’s something like

DRIVER={MariaDB ODBC 5.1 Driver}; SERVER=LOCALHOST; PORT=3306; DATABASE=DatabaseName; UID=root; PASSWORD=password;OPTION=3;

Connection strings seems to show strings for MySQL but not MariaDB.

MariaDB seems to have a lot of connection strings for Access, SQL Lite, excel, etc …

What have I missed?

Answer :

Although this is late answer, but MariaDB have that documented here

SQLWCHAR *ConnStr= L"Driver={MariaDB ODBC 2.0 Driver};Server=localhost;UID=odbc_user;PWD=odbc_pw;DB=odbc_test;Port=3306";

Leave a Reply

Your email address will not be published. Required fields are marked *