MySQL ODBC for Linux
时间:2021-07-01 10:21:17
帮助过:2人阅读
-
odbc package
# Setup from the unixODBC package
[PostgreSQL]
Description = ODBC
for PostgreSQL
Driver = /usr/lib/
psqlodbcw.so
Setup = /usr/lib/
libodbcpsqlS.so
Driver64 = /usr/lib64/
psqlodbcw.so
Setup64 = /usr/lib64/
libodbcpsqlS.so
FileUsage =
1
# Driver from the mysql-connector-
odbc package
# Setup from the unixODBC package
[MySQL]
Description = ODBC
for MySQL
Driver = /usr/lib/
libmyodbc5.so
Setup = /usr/lib/
libodbcmyS.so
Driver64 = /usr/lib64/
libmyodbc5.so
Setup64 = /usr/lib64/
libodbcmyS.so
FileUsage =
1
vim /etc/odbc.ini
[flow-connector]
Description = MySQL connection to ‘mysql‘ database
Driver = MySQL
Database = mysql
Server = localhost
UserName = root
Password = password
Port = 3306
Socket = /var/lib/mysql/mysql.sock
验证MySQL驱动,返回/etc/odbcinst.ini中的配置段标题表示成功,如:[MySQL]
odbcinst -q -d
现在利用isql功能验证能连到你的数据库上,当你输入指令后会看到结果为1的返回值就表明连接成功了
echo "select 1" | isql -v asterisk-connector
MySQL ODBC for Linux
标签: