Why mysql odbc configuration not setup in linux?

2.8k views Asked by At

I have two systems. my first system is ubuntu 16.04. which, work as remote. and another is centos 6. which, run in virtually. In centos, freeswitch installed. I have to send data from freeswitch to remote system means ubuntu. on centos, my configuration of odbc.ini as :

[freeswitch]
DRIVER = /usr/lib64/libodbcmyS.so
SERVER = <ipaddress>
USER = root
PASSWORD = <password>
PORT = 3306
DATABASE = freeswitch
OPTION = 67108864

and odbcinst.int as below:

[MySQL]
Description     = ODBC for MySQL
Driver          = /usr/lib64/libmyodbc.so
Setup           = /usr/lib64/libodbcmyS.so
FileUsage       = 1
Threading = 0

after setup above code. I have to check odbc connection. for this, command fire as :

isql -v freeswitch

but, it show error as :

[IM004][unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed
[ISQL]ERROR: Could not SQLConnect
2

There are 2 answers

1
AudioBubble On BEST ANSWER

wrong driver description arise this type of error. I have set proper driver description. wrongly, setup description mention in driver field.

0
Brian Ye On

I think you need to change the line DRIVER = /usr/lib64/libodbcmyS.so to DRIVER = MySQL

Thanks.