S
S
sergey_fs2017-11-24 11:18:19
Debian
sergey_fs, 2017-11-24 11:18:19

Odbc mariadb won't connect?

Tell me how to correctly configure the ODBC driver on Debian 9 to work with Mariadb
[email protected]:~# cat /etc/odbc.ini
[freeswitch]
Description=MySQL connection to 'FS' database
Driver = MySQL
server=127.0.0.1
database=freeswitch
Port =3306
Socket=/var/lib/mysql/mysql.sock
OPTION = 67108864
USER=root
PASSWORD=xxxxxxxxxx
[email protected]:~# cat /etc/odbcinst.ini
[MySQL]
Description = ODBC for MySQL
Driver = /usr/lib /x86_64-linux-gnu/odbc/libmaodbc.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so
FileUsage = 1
driver files are all there
[email protected]:~# ls -l /usr/lib/x86_64-linux-gnu/odbc/
total 2108
-rw-r--r-- 1 root root 10408 Dec 12 2016 libesoobS.so
-rw-r--r -- 1 root root 1936232 Nov 24 02:21 libmaodbc.so
-rw-r--r-- 1 root root 10352 Dec 12 2016 libmimerS.so
-rw-r--r-- 1 root root 90192 Dec 12 2016 libnn .so
-rw-r--r-- 1 root root 6192 Dec 12 2016 libodbcdrvcfg1S.so
-rw-r--r-- 1 root root 6160 Dec 12 2016 libodbcdrvcfg2S.so
-rw-r--r-- 1 root root 6208 Dec 12 2016 libodbcminiS.so
-rw-r--r-- 1 root root 10320 Dec 12 2016 libodbcmyS.so
-rw-r--r-- 1 root root 6192 Dec 12 2016 libodbcnnS.so
-rw- r--r-- 1 root root 10400 Dec 12 2016 libodbcpsqlS.so
-rw-r--r-- 1 root root 6232 Dec 12 2016 libodbctxtS.so
-rw-r--r-- 1 root root 10704 Dec 12 2016 liboplodbcS.so
-rw-r--r-- 1 root root 6168 Dec 12 2016 liboraodbcS.so
-rw-r--r-- 1 root root 6312 Dec 12 2016 libsapdbS.so
-rw-r--r-- 1 root root 6168 Dec 12 2016 libtdsS.so
[email protected]:~ # echo "select 1" | isql -v freeswitch
[S1000][unixODBC][ma-2.0.13]Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[ISQL]ERROR: Could not SQLConnect
[email protected]:~#

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
vlarkanov, 2017-11-24
@vlarkanov

mysql -u root (locally) allows you to login to the database?

K
kiba, 2018-02-12
@kiba

It could be a dependency issue in the third branch of the driver:

$ ldd /path/to/libmaodbc.so | grep "not found"
        libssl.so.1.0.0 => not found
        libcrypto.so.1.0.0 => not found

You need to take a lib from the second one: https://downloads.mariadb.com/Connectors/odbc/conn...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question