Adding An ODBC Driver For MySQL On Ubuntu
Adding An ODBC Driver For MySQL On UbuntuSometimes you may find the need to develop cross platform applications which make use of a database. ODBC can be a solution to your portability needs, but unfortunately it is not as easy to set up an ODBC connection on Linux as it is on Windows. This tutorial attempts to shed some light on this process by guiding you towards adding an ODBC driver on Ubuntu. The process described below has been tested on Ubuntu 8.04 and Ubuntu 8.10.
1. Install iodbc - GTK+ config frontend for the iODBC Driver Managersudo apt-get install iodbc
2. Install mysql connector for odbcsudo apt-get install libmyodbc
3. Start iodbciodbcadm-gtk
4. Add the mysql driver to the list of ODBC driversSwitch to the "ODBC Drivers" tab, click "Add a driver". Type in a description of the driver (i.e., "MySQL"). For "Driver file name" choose /usr/lib/odbc/libmyodbc.so. This setup file appears to be supplied by unixodbc, which I already had installed.
5. Create a new User DSN (the procedure is the same for System DSN)Click "Add", select the already created MySQL ODBC driver. Give a name to your datasource (i.e.,"bobs_mysqldb"). You will now have to add a few keywords based on your server configuration. Minimally you should have: server The complete list of available keywords is documented on the MySQL connector page. That's it.
|

![Creative Commons Attribution License [Creative Commons Attribution License]](http://creativecommons.org/images/public/somerights20.gif)


Recent comments
1 day 12 hours ago
1 day 16 hours ago
1 day 16 hours ago
1 day 17 hours ago
1 day 18 hours ago
2 days 6 hours ago
2 days 19 hours ago
2 days 22 hours ago
2 days 23 hours ago
3 days 18 hours ago