???????mysql???Linux??Mysql??odbc????????????????:
?????????????????????????????MyODBC????. MyODBC???????????5??????????????????

????Driver Manager:
?????????????ó????????????????????????????:????DSN (??????????ODBC?????????????ODBC.INI?????????)???????ж??????????????ODBC????????????????????.
????Connector/ODBC(MyODBC????????):
???????ODBC API??????????????????ODBC???????????SQL????????MySQL??????????????????????ó???.
????ODBC.INI
????ODBC.INI??ODBC?????????????????????????????????????????????????Driver Manager?????????????????????????????????????DSN?????????????????????DSN??????????????
??????Linux??????mysql ODBC????????2???:
????1.???Driver Manager ???????????unixODBC?????Driver Manager.
????2.???MySQL?????????????????Connector/ODBC.
????3.????ODBC.INI
?????????:????????.
????????????????????unixODBC 2.3.0??mysql Connector/ODBC 3.51
????unixODBC????:ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.0.tar.gz
?????????
????http://dev.mysql.com/downloads/connector/odbc/3.51.html%23downloads
???????
?????汾??5.1.11
????????Oracle&Red Hat Linux6
?????????mysql-connector-odbc-5.1.11-linux-el6-x86-64bit.tar.gz
?????????:???unixODBC
????tar zxvf unixODBC-2.3.0.tar.gz
????cd unixODBC-2.3.0
????./configure --prefix=/usr/local/unixODBC-2.3.0 --includedir=/usr/include --libdir=/usr/local/lib -bindir=/usr/bin --sysconfdir=/usr/local/etc
????make
????make install
?????????????????/usr/bin??????????????
????-rwxr-xr-x 1 root root75312 Nov1 16:22 odbcinst
????-rwxr-xr-x 1 root root10922 Nov1 16:22 odbc_config
????-rwxr-xr-x 1 root root37650 Nov1 16:22 iusql
????-rwxr-xr-x 1 root root44400 Nov1 16:22 isql
????-rwxr-xr-x 1 root root95903 Nov1 16:22 dltest
??????/usr/local/lib??????????Щ???
????-rwxr-xr-x 1 root root422955 Nov1 16:22 libodbcinst.so.1.0.0
????lrwxrwxrwx 1 root root20 Nov1 16:22 libodbcinst.so.1 -> libodbcinst.so.1.0.0
????lrwxrwxrwx 1 root root20 Nov1 16:22 libodbcinst.so -> libodbcinst.so.1.0.0
????-rwxr-xr-x 1 root root981 Nov1 16:22 libodbcinst.la
????-rwxr-xr-x 1 root root 1691572 Nov1 16:22 libodbc.so.1.0.0
????lrwxrwxrwx 1 root root16 Nov1 16:22 libodbc.so.1 -> libodbc.so.1.0.0
????lrwxrwxrwx 1 root root16 Nov1 16:22 libodbc.so -> libodbc.so.1.0.0
????-rwxr-xr-x 1 root root957 Nov1 16:22 libodbc.la
????-rwxr-xr-x 1 root root489405 Nov1 16:22 libodbccr.so.1.0.0
????lrwxrwxrwx 1 root root18 Nov1 16:22 libodbccr.so.1 -> libodbccr.so.1.0.0
????lrwxrwxrwx 1 root root18 Nov1 16:22 libodbccr.so -> libodbccr.so.1.0.0
????-rwxr-xr-x 1 root root969 Nov1 16:22 libodbccr.la
??????????:???mysql Connector/ODBC
??????odbc 5.3????????libmyodbc5a.so??libmyodbc5w.so??????c5a??Ansi?棬c5w??Unicode?棩
????tar zxvf mysql-connector-odbc-5.1.11-linux-el6-x86-64bit.tar.gz
????cd mysql-connector-odbc-5.1.11-linux-el6-x86-64bitlib
????cp libmyodbc5.so /usr/local/lib
????cd ../
????cd bin
????1?????????
????./myodbc-installer -d -a -n "MySQL ODBC 5.1 Driver"
????-t "DRIVER=/usr/lib/libmyodbc5.so;SETUP=/usr/lib/libmyodbc5.so"
?????????:????ODBC.INI:
?????????/usr/local/etc/odbc.ini?????????????????.????????£?????汾mysql?????????÷?????????????. ??????????汾??mysql Connector 3.51
????[mysqlDSN]
????Driver= /usr/local/lib/libmyodbc5.so
????Description= MyODBC 5 Driver DSN
????SERVER= 172.31.108.133
????PORT= 3306
????USER= root
????Password= 123456
????Database= PM
????OPTION= 3
????SOCKET=
???????崠:???????????
????export DBCINI=/usr/local/etc/odbc.ini
????export DBCSYSINI=/usr/local/etc
???????????????????
????reboot
?????????:????ODBC?????????
????Isql??unixODBC???????ODBC???????????????isql +?????????????????????.
???????ODBC??????????????????????.??SQL>???????????SQL??????????.
????# isql mysqlDSN
????+---------------------------------------+
????| Connected!|
????||
????| sql-statement|
????| help [tablename]|
????| quit|
????||
????+---------------------------------------+