This is a read-only copy of the MariaDB Knowledgebase generated on 2024-11-15. For the latest, interactive version please visit https://mariadb.com/kb/.

Setting up ODBC in linux using unixODBC manager

I am trying to access a Debian 8.6 based, Maria data base via ODBC, and hope to be able to use LibreOffice Base as a front end database tool.

So far I have unixODBC installed and working, at least for mdb database using the mdbtools drivers, in other words, I can get a sql> prompt from isql and issue simple sql commands to the mdb data base.

But I can't seem to get ODBC working for my maria database. I'm not sure what properties to put in unixODBC's /etc/odbcinst.ini and /etc/odbc.ini files.

Here's what I'm trying in /etc/odbcinst.ini:

[mariadb] Description=Maria DB Driver=/usr/lib/x86_64-linux-gnu/odbc/libmaodbc.so Driver64= Setup= Setup64= UsageCount=1 CPTimeout= CPTimeToLive= DisableGetFunctions= DontDLCLose= ExFetchMapping= Threading= FakeUnicode= IconvEncoding= Trace= TraceFile= TraceLibrary= CPReuse=

And in /etc/odbc.ini:

[mariadb] DSN=Maria2 Driver=mariadb Server=localhost User=root Password='xxx' Database=bigbase Port=3306 Option=

When I issue the command:

isql mariadb root 'xxx' -v

I get:

[S00][nxDC[a201]a' onc olclMSLsre hog okt'tpmslsc'() [ISQL]ERROR: Could not SQLConnect

If I try:

iusql mariadb root 'xxx' -v

I get:

[nxDC[ma-2.0.12]Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) [ISQL]ERROR: Could not SQLDriverConnect

Please help me get this working. If you have any examples, or can point to what parameters I am suppose to use would be helpful. Thanks.

Answer Answered by H Json in this comment.

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.