ODBC or Open Database Conectivity provides a standard software interface for accessing database management systems (DBMS). ODBC could work in multi platform. With ODBC API, the application only needs to know ODBC syntax, and the driver can then pass the query to the DBMS in its native format, returning the data in a format the application can understand.
As ODBC work in multi platform, ODBC could work in Ubuntu as well. For software developer they are using ODBC so their application could work in any platform. To install ODBC on Ubuntu follow the steps below:
1. Open your terminal, install iodbc
sudo apt-get install iodbc
2. Install mysql connector for odbc
sudo apt-get install libmyodbc
3. Start iodbc
This will open iodbc GUI management.
4. Now add MySQL driver to odbc
In odbc driver tab, add a driver, give any description you want, and
For “Driver file name” choose /usr/lib/odbc/libmyodbc.so.
For “Setup file name” choose /usr/lib/odbc/libodbcmyS.so.
5. Create a new User DSN
Click Add, and give a name to your datasource (example: “my_mysql_odbc”). Then give these information:
server -> Your mysql server
database -> database name
user -> user that have access to the database
password -> user password
Now you can use this ODBC driver in your application just like in Windows environment. When your application ready to deploy, you just need to setup the odbc driver in other platform and your application will run as usual.