Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

# centos
yum install mysql-connector-odbc

#ubuntu
apt-get install libmyodbc

root@ip-10-0-1-82:~# odbcinst -q -s
[testdb]
root@ip-10-0-1-82:~# odbcinst -q -d
[PostgreSQL]
[MySQL]
root@ip-10-0-1-82:~# odbcinst -j
unixODBC 2.2.14
DRIVERS…………: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
FILE DATA SOURCES..: /etc/ODBCDataSources
USER DATA SOURCES..: /root/.odbc.ini
SQLULEN Size…….: 8
SQLLEN Size……..: 8
SQLSETPOSIROW Size.: 8
root@ip-10-0-1-82:~# isql -S testdb -U root -P somepassword

checking shared odbc libraries linked to isql for default directories…
strings: ”: No such file
trying /tmp/sql … no
trying /tmp/sql … no
trying /etc … OK
checking odbc.ini files
reading /root/.odbc.ini
[testdb] found in /root/.odbc.ini
found this section:
[testdb]
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so
SERVER = localhost
USER = root
PASSWORD = somepassword
PORT = 3306
DATABASE = db2
Charset = UTF8
looking for driver for DSN [testdb] in /root/.odbc.ini
found driver line: ” Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so”
driver “/usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so” found for [testdb] in .odbc.ini
found driver named “/usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so”
/usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so is an executable file
“SERVER” found, not using freetds.conf
SERVER is “localhost”

Configuration looks OK. Connection details:

DSN: testdb
odbc.ini: /root/.odbc.ini
Driver: /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so
Server hostname: localhost
Address: 127.0.0.1

Attempting connection as root …
+ isql testdb root somepassword -v
+—————————————+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+—————————————+
SQL>