我曾尝试在MacOSX10.9和Debian 8上使用unixODBC (2.3.2版)和MonetDB ODBC客户端(11.21.5版),但无法通过MonetDB在客户端机器上使用isql连接到运行在Debian 8上的MonetDB服务器,尽管它在服务器机器上运行良好。
当在客户端机器上发出isql -v voc时,我会收到以下错误消息:
08001 08001MonetDBClient无法建立连接ISQLERROR:无法SQLConnect
这是我的.odbc.ini文件:
[voc]
Driver = MonetDB
Description = MonetDB voc test database
Servername = <<left out>>
Port = 50000
UserName = monetdb
Password = monetdb
Database = voc我的/opt/local/etc/odbcinst.ini文件:
[MonetDB]
Description = ODBC Driver for MonetDB SQL Server
Driver = /usr/local/monetdb/lib/libMonetODBC.so
Setup = /usr/local/monetdb/lib/libMonetODBCs.so
FileUsage = 1有趣的是,我能够使用mclient从客户端计算机和服务器机器连接,还可以使用以下命令行:
mclient -d voc -u monetdb -h <<left out>>
服务器配置如下:
monetdbd get all testing/testDBfarm/
property value
hostname <<left out>>
dbfarm testing/testDBfarm/
status monetdbd[37007] 1.7 (Jul2015) is serving this dbfarm
mserver /usr/bin/mserver5
logfile testing/testDBfarm//merovingian.log
pidfile testing/testDBfarm//merovingian.pid
sockdir /tmp
port 50000
exittimeout 60
forward proxy
discovery true
discoveryttl 600
control no
passphrase <unknown>
mapisock /tmp/.s.monetdb.50000
controlsock /tmp/.s.merovingian.50000 这里有什么需要让客户端通过ODBC连接到MonetDB服务器的东西吗?
发布于 2015-09-24 12:47:31
isql (运行ODBCDEBUG=/tmp/odbclog isql test)的调试日志揭示了这个问题:
MonetDB ODBC驱动程序忽略了配置文件中的Servername参数。
.odbc.ini:
Servername =省略
日志:
SQLConnect: DSN=voc UID=monetdb PWD=monetdb host=localhost port=50000 database=voc.
非常不幸的是,大多数ODBC驱动程序使用不同的名称来指定服务器的主机名或IP地址:服务器名、主机,甚至服务器(参见:http://www.unixodbc.org/odbcinst.html)
因此,对于MonetDB的ODBC驱动程序,我们需要使用Host来指定主机名,而不是Servername或Server,比如Postgres或MySQL。
https://stackoverflow.com/questions/32385908
复制相似问题