3
我已經在Mac OSX Lion上安裝了來自源的unixODBC和來自.dmg installer的mysql-odbc connector。這是前一陣子完成的,當時我成功安裝了一個數據源(我們稱之爲foo
)。現在我正在嘗試添加另一個數據源(DSN)。我通過ODBC Manager和命令行工具myodbc-installer通過mysql網站上的mysql-odbc連接器的tar包提供了相關信息。條目顯示了在/Library/ODBC/odbc.ini
,它看起來像這樣:在Mac OSX Lion上爲unixODBC/isql添加數據源
[ODBC Data Sources]
bar = MySQL ODBC 5.1 Driver
[ODBC]
Trace = 0
TraceAutoStop = 0
TraceFile =
TraceLibrary =
[myodbc]
Driver = /usr/local/lib/libmyodbc5.so
SERVER = localhost
PORT = 3306
[bar]
Driver = /usr/local/lib/libmyodbc5.so
Description =
DATABASE = bar
然而,ISQL沒有找到它:
anitya:Preferences neil$ isql bar bar bar -v
[IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified
[ISQL]ERROR: Could not SQLConnect
奇怪的是,老DSN foo
,這是不是在可見/Library/ODBC/odbc.ini或/etc/odbc.ini,做工精細:
anitya:Preferences neil$ isql foo foo foo
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL>
我惱火關於DSN條目需要在OSX獅子進入其中由ISQL被發現。在此先感謝您的幫助!