centos7 unixodbc 连接mysql

1、yum install unixODBC unixODBC-devel libtool-ltdl libtool-ltdl-devel

2、yum install mysql-connector-odbc

3、/etc/odbcinst.ini

[freeswitch]

Driver=MySQL
SERVER=192.168.16.4
PORT=3306
DATABASE=freeswitch
USER=root
PASSWORD=123456
Socket=/var/lib/mysql/mysql.sock

4、vi /etc/odbcinst.ini

[MySQL]
Description=ODBC for MySQL
Driver=/usr/lib64/libmyodbc8a.so
Setup=/usr/lib64/libodbcmyS.so
Driver64=/usr/lib64/libmyodbc8a.so
Setup64=/usr/lib64/libodbcmyS.so
FileUsage=1

posted @ 2019-07-15 17:05  咸蛋超人、  阅读(1822)  评论(0编辑  收藏  举报