[IM002] [unixODBC] [驱动程序管理器]未找到数据源名称,并且未指定默认驱动程序

时间:2015-07-13 11:26:29

标签: ubuntu odbc ubuntu-12.04 zabbix

我尝试在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

0 个答案:

没有答案