This is an old revision of the document!
If you are going to connect to a localhost MySQL database you do not need to setup any additional libraries to use SQLines Data tool as they are supplied with MySQL server.
If you need to connect to a remote MySQL database, you need to have MySQL C API libmysqlclient installed in your system.
Before downloading check if you already have MySQL libraries:
If MySQL client is not available, go to MySQL Download page https://dev.mysql.com/downloads/connector/ and download MySQL Connector/C.
Download the latest version of MySQL Connector/C, for example, mysql-connector-c-6.1.9-linux-glibc2.5-x86_64.tar.gz and extract files:
tar -xvzf mysql-connector-c-6.1.9-linux-glibc2.5-x86_64.tar.gz
You can find libmysqlclient.so library at lib directory. Before running sqldata command, add MySQL library location to LD_LIBRARY_PATH:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<mysql_connector_dir>/lib
An alternative way to install MySQL libraries is to run:
yum install mysql-devel
If your .so file ends with the library version, for example, libmysqlclient.so.16 then create a symbolic link, so SQLines Data tool is able to load the required library:
cd <mysql_connector_dir>/lib ln -s libmysqlclient.so.16 libmysqlclient.so
When you click Test Connection you get the following error:
Possible reasons:
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.
Contact us at support@sqlines.com if you still have any connection problems.