1、Installation of UnixODBC Manual UbuntuChina PS Team目录1. Install the MySQL Server and MySQL client32. Start MySQL and add the password33. Install the unixODBC. 34. Find the libmyodbc.so.35. Configure the odbc.ini and odbcinst.ini46. Test the unixODBC working well.47. Using ODBCConnector CFS to fetch
2、data via unixODBC. 51. Install the MySQL Server and MySQL clientIn console , Then type:sudo apt-get install mysql-server mysql-client2. Start MySQL and add the password.In console, Then type:service mysql startmysqlmysqlSET PASSWORD FOR rootlocalhost=PASSWORD(mypassword);3. Install the unixODBC.In c
3、onsole, Then type :sudo apt-get install unixodbc libmyodbcIt will install unixODBC automatically.4. Find the libmyodbc.soIn console, Then type: find name libmyodbc.so5. Configure the odbc.ini and odbcinst.iniIn console, Then type:cd etcvi odbc.iniadd this as following:mysql-testDescription=MySQL Tes
4、tTrace=OnTraceFile=stderrDriver=MySQLSERVER=localhostUSER=usernamePASSWORD=passwordPORT=3306DATABASE=databasenameSave the odbc.ini and type:vi odbcinst.iniadd this as following:MySQL Description = MySQL driver for LinuxDriver=/usr/lib/x86_64-linux-gnu/odbc/libmyodbc.soSetup=/usr/lib/x86_64-linux-gnu
5、/odbc/libmyodbc.soFileUsage=1Save the odbcinst.iniPS: Driver define in odbc.ini must be equal to odbcinst.ini.eg: Driver=MySQL in odbc.ini equal the MySQL in odbcinst.ini6. Test the unixODBC working wellIn console, Then type:isql mysql-test (the DSN you defined in odbc.ini) Connected unixODBC to mysql.7. Using ODBCConnector CFS to fetch data via unixODBC.It configure like windows version, But you must add this as following in you startconnector.shexport ODBCINI=/etc/odbc.iniexport ODBCSYSINI=/etc/otherwise, The connector will not find the DNS and odbcdriver.