我尝试在ODBC
上安装Ubuntu 12.04
,以便将其与Zabbix
一起使用。我根据这些Zabbix instructions安装了unixODBC
并修改了我的/etc/odbc.ini,如下所示:
[eyatest]
Description = MySQL connection to 'dbname' database
Driver = MySQL
Database = dbname
Server = localhost
UserName = root
Password = ****
Port = 3306
Socket = /var/lib/mysql/mysql.sock
但是当我尝试与isql
连接时,我在这个问题的标题中出现错误:
sudo isql -v eyatest
[IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified
我错过了什么?
编辑:我的/etc/odbcinst.ini
看起来像这样:
[MySQL]
Description = ODBC for MySQL
Driver = /usr/lib/odbc/libmyodbc.so
Setup = /usr/lib/odbc/libodbcmyS.so
FileUsage = 1
当我odbcinst -j
时,我得到以下内容:
unixODBC 2.2.14
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
FILE DATA SOURCES..: /etc/ODBCDataSources
USER DATA SOURCES..: /home/eyal/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8