mysql - How to connect to ODBC DSN with unixODBC on Zabbix? -


i installed unixodbc , mysql odbc driver, can not connect odbc dns.

isql -v myodbc_mysql_dsn 

i got error :

cannot connect odbc dsn: [sql error]:[im002][0][[unixodbc][driver manager]data source name not found, , no default driver specified]| 

my configration looks this:

cat /etc/odbc.ini [myodbc_mysql_dsn] description = test driver      = mysql5                 # custom driver name server      = localhost                    # or external ip if needed port        = 3306                         # or custom port if needed socket      = /var/run/mysqld/mysqld.sock  # socket, see above database    = zabbix                     # mysql db name or empty option      = 3 readonly    = no 
cat /etc/odbcinst.ini [mysql5] description = odbc mysql driver      = /usr/lib/odbc/libmyodbc5.so setup       = /usr/lib/odbc/libodbcmys.so #driver     = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so #setup      = /usr/lib/x86_64-linux-gnu/odbc/libodbcmys.so fileusage   = 1  usagecount = 2 ' 

what should do?

here tips: use:

odbcinst -q -s

to see if driver sees datasources

then

odbcinst -j

should show filepaths *.ini


Comments