linux安装odbc for mysql

1 安装驱动包

yum install unixODBC-devel -y
yum install -y mysql-connector-odbc

  

2 配置数据源

[root@omserver-11 ~]# cat /etc/odbc.ini 
[modules]
Description     = MySQL
Driver          = MySQL
SERVER          = localhost
PORT		= 3306
Database        = config
USER            = root

  

3 连接测试

[root@webmaster pyodbc-4.0.24]# isql -v modules root root
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+

  

 

posted @ 2018-09-26 11:49  jabbok  阅读(720)  评论(0编辑  收藏  举报