How do I install the ODBC connector/driver on Linux Mint 17.3

I can not find the installation procedure for the gzip or source packages anywhere. (1.0.5 or 2.0.9) Thanks in advance.

Answer Answered by Lawrin Novitsky in this comment.

1.0.x series of the connector is Windows only, thus you need 2.0.9. It comes only in form of tar.gz You may unpack tar.gz wherever you want, but make sure your application is able to read it. You need UnixODBC to be installed on the host. Unless you want to directly link your application against the connector, but I doubt this is the case. Then you need to register the driver and create a dsn, if you need one. For that you need to edit file odbcinst.ini and odbc.ini For that you need to look where ODBCINI and ODBCSYSINI environment variable point. If they are not defined, you can either edit files in /etc , or create new files and set env variables appropriately. One more thing regarding them ODBCSYSINI points not to the file, but to the containing directory. To the odbcinst.ini you need to add something like

[maodbc]
Driver = /path/to/your/libmaodbc.so
Description     = MariaDB ODBC Connector

Here "maodbc" would be the name you should use in connection strings for driver. To define a DSN you need to edit odbc.ini and add ther smth like

[maodbc_test]
Driver          = maodbc
DATABASE        = test
DESCRIPTION     = MariaDB ODBC Connector Test
SERVER          = 10.0.0.1
UID             = root
PASSWORD        = 
PORT		        = 3306

Here "maodbc_test" would be the DSN. For socket connection you would need to have SOCKET= ... row instead of SERVER and PORT.

This is more or less it. I hope it helps.

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.