Setting Up ODBC For Cdr Logging Into MariaDB
Hello,
I am trying to set up cdr logging into MariaDB through ODBC.
I have installed unixodbc unixodbc-dev and now I am struggling with configuring /etc/odbcinst.ini
All the examples online use non-existent libraries, ie:
[MySQL]
Description = MySQL ODBC MyODBC Driver Driver = /usr/lib/x86_64-linux-gnu/odbc/libmaodbc.so Setup = /usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so FileUsage = 1
I have these odbc related libraries on my system. Which of those do I
have to use for `Driver =` ?
/usr/lib/x86_64-linux-gnu/libodbc.so
/usr/lib/x86_64-linux-gnu/libodbccr.so
/usr/lib/x86_64-linux-gnu/libodbcinst.so
/usr/lib/x86_64-linux-gnu/odbc/libesoobS.so
/usr/lib/x86_64-linux-gnu/odbc/libmimerS.so
/usr/lib/x86_64-linux-gnu/odbc/libnn.so
/usr/lib/x86_64-linux-gnu/odbc/libodbcdrvcfg1S.so
/usr/lib/x86_64-linux-gnu/odbc/libodbcdrvcfg2S.so
/usr/lib/x86_64-linux-gnu/odbc/libodbcminiS.so
/usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so
/usr/lib/x86_64-linux-gnu/odbc/libodbcnnS.so
/usr/lib/x86_64-linux-gnu/odbc/libodbcpsqlS.so
/usr/lib/x86_64-linux-gnu/odbc/libodbctxtS.so
/usr/lib/x86_64-linux-gnu/odbc/liboplodbcS.so
/usr/lib/x86_64-linux-gnu/odbc/liboraodbcS.so
/usr/lib/x86_64-linux-gnu/odbc/libsapdbS.so
/usr/lib/x86_64-linux-gnu/odbc/libtdsS.so
I have tries many possible permutations, but none worked.
thanks,
—
4 thoughts on - Setting Up ODBC For Cdr Logging Into MariaDB
I think you are missing a package, you need the odbc driver from mariadb, downloaded from their git repository — if you build this using the default installation on a Debian type system, you would get
/usr/local/lib64/libmaodbc.so as the driver file.
—
Your life is like a penny. You’re going to lose it. The question is:
How do you spend it?
John Covici wb2una
covici@ccs.covici.com
—
On my Debian Buster I have:
dpkg -l|grep odbc
ii libmyodbc:amd64 5.1.10-3 amd64 the MySQL ODBC
driver ii libodbc1:amd64 2.3.6-0.1 amd64 ODBC library for Unix ii odbcinst 2.3.6-0.1 amd64 Helper program for accessing odbc ini files ii odbcinst1debian2:amd64 2.3.6-0.1 amd64 Support library for accessing odbc ini files ii unixodbc 2.3.6-0.1 amd64 Basic ODBC tools ii unixodbc-dev:amd64 2.3.6-0.1 amd64 ODBC libraries for UNIX (development files)
cat /etc/odbcinst.ini
[PostgreSQL]
Description = ODBC for PostgreSQL
Driver = /usr/lib/libodbcpsql.so.1
Setup = /usr/lib/libodbcpsqlS.so.1
FileUsage = 1
[MySQL]
Description = ODBC for MySQL
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so Setup = /usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so FileUsage = 1
Doug
thank you. My system is also Debian Buster. I have same packages installed, except libmyodbc
There is no such package in the repositories:
apt-cache search libmyodbc
and thus, I have no file /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so
did you compile libmyodbc yourself ?
—
No,
If I recall correctly, after a lot of searching, I ran into the apt source below and created the myodbc.list and put it into
/etc/apt/sources.list.d
cat myodbc.list
deb http://ftp.de.debian.org/debian jessie main
I just ignored the complaints about not having a GPG key.
Doug