SQLines Data - Configure and Troubleshoot Connection to MariaDB

If you are going to connect to a localhost MariaDB database you do not need to setup any additional libraries to use SQLines Data tool as they are supplied with MariaDB server.

If you need to connect to a remote MariaDB database, you need to have MariaDB C API libmariadb installed in your system.

Before downloading check if you already have MariaDB libraries:

  • Linux:
    • libmariadb.so
  • Windows: (Drive letter and version can be different)
    • C:\Program Files\MariaDB\MariaDB Connector C 64-bit\lib\libmariadb.dll

If the MariaDB client is not available, go to MariaDB Download page http://www.mariadb.com and download MariaDB Connector C.

Troubleshooting Connection on Windows

When you click Test Connection you get the following error:

  • Error Loading MariaDB C API libmariadb.dll. The specified module could not be found

Possible reasons:

  • MariaDB C API is not installed. Downlaod and install MariaDB C API client (MariaDB Connector C) at http://www.mariadb.com
  • MariaDB C API is installed but SQLines Data tool cannot find libmariadb.dll for some reason. Add the directory where libmariadb.dll is located (for example, C:\Program Files\MariaDB\MariaDB Connector C 64-bit\lib) to the PATH environment variable and restart SQLines Data tool.

To set the PATH variable on Windows, right-click the Computer icon, select Properties, click the Advanced System Settings. Then select Advanced tab and click the Environment Variables button. Go to System Variables, find and append Path.

Instead of the system PATH variable, you can also specify the path to MariaDB library using the -mariadb_lib option of SQLines Data configuration file sqldata.cfg. For example, you can set -mariadb_lib=C:\Program Files\MariaDB\MariaDB Connector C 64-bit\lib\libmariadb.dll

Contact us at support@sqlines.com if you still have any connection problems.