[ODBC-99] How to install Maria ODBC into Linux server Created: 2017-05-18  Updated: 2021-03-04  Resolved: 2017-10-26

Status: Closed
Project: MariaDB Connector/ODBC
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major
Reporter: pakorn Assignee: Lawrin Novitsky
Resolution: Fixed Votes: 0
Labels: None
Environment:

Linux



 Description   

I am trying to install MariaDB ODBC into my Linux in order to communicate with MariaDB server. I did download "MariaDB Connector/ODBC 2.0.14" but unable to find the instruction how to install it. Could you please kindly advise or provide the document how to install MariaDB ODBC?

Kind regards,
Pakorn



 Comments   
Comment by Lawrin Novitsky [ 2017-05-26 ]

Sorry, I am afraid we still don't have that info in our Knowledge Base. I briefly write you here how to do that, and later will add this info probably https://mariadb.com/kb/en/mariadb/about-mariadb-connector-odbc/ , and then will close this report.

So far we distribute only tarballs. You need to copy library file to the appropriate place on your system, like /usr/local/lib , but basically it can be everywhere - you can have it say in ~/odbc/

Then you might need Driver Manager. On Linux we support UnixODBC only.

Then you need to check ODBCINI and ODBCSYSINI variables of your application environment. ODBCINI should contain full filename of odbc.ini file, ODBCSYSINI - directory, containing your ini files

If they are not set, you might want either set them, or use odbc.ini and odbcinst.ini in /etc/ on your system

In your odbcinst.ini file you add section
[MariaDB ODBC 2.0 Driver] #<- This gonna be driver name to use as value for DRIVER key in your connection string. It can be actually any name you choose. I gave here the default name our installer use on Windows
Driver = /path/where/you/put/your/libmaodbc.so
Description= The description of this driver you want

Basically, that is minimal thing you need to be able to connect with SQLDriverConnect. You can specify DRIVER=

{MariaDB ODBC 2.0 Driver}

and other connection properties in the connection string. You can look at the kb page I gave above for connection string options.
But you also might want to add DSN to the odbc.ini file. Something like :

[maodbc_test] #<- DSN name to use in connection strings or in SQLConnect
Driver=MariaDB ODBC 2.0 Driver
DATABASE=test
DESCRIPTION=MariaDB ODBC Connector Test
SERVER=localhost
UID=<your_uid>
PASSWORD=your_pwd
PORT=3306

Then if your application is linked against UnixODBC's libodbc, everything should work fine

I hope this helps. I will ask our documentation guy to brush up this text, and put it on KB

Comment by Lawrin Novitsky [ 2017-10-26 ]

Instructions have been added to https://mariadb.com/kb/en/mariadb/about-mariadb-connector-odbc/

Generated at Thu Feb 08 03:26:13 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.