Install ODBC driver in Ubuntu

Source: Internet
Author: User
Tags driver manager dsn gtk odbc connection

For Ubuntu, you can also create ODBC connections based on an open-source project called iodbc, which aims to enable the UNIX System to Use ODBC connections. iodbc is the open-source implementation of ODBC. Tested on Ubuntu
8.04 and Ubuntu 8.10 can work normally.

First, you must have mysql. If it has not been installed, run the following command:

$ Sudo apt-Get install mysql-client mysql-Server

Install iodbc driver Manager (Front-End Interface written by GTK ):

$ Sudo apt-Get install iodbc

Install MySQL odcb connector:

$ Sudo apt-Get install libmyodbc

Start iodbc:

$ Sudo iodbcadm-GTK


 

You should be familiar with this interface. It is almost the same as the ODBC connection setting interface in windows. To connect to MySQL through ODBC, load the ODBC driver of MySQL, click the "ODBC drivers" tab card, and then click the "add a driver" button, in the "ODBC driver Add/setup" dialog box, set the following content in sequence:

Description of the driver: MySQL (you can name it at will)

Driver file name:/usr/lib/ODBC/libmyodbc. So

Setup File Name:/usr/lib/ODBC/libodbcmys. So

As shown in:



After setting, click "OK" to load the ODBC driver of MySQL. Then, you can create an ODBC connection for MySQL, click the "user DSN" or "system DSN" tab and click the "add" button to create an odcb connection. In the "choose an ODBC driver" dialog box, you can see the ODBC driver of the newly added MySQL instance, click the "finish" button to bring up the "setup of DSN unknown" dialog box. You need to set "data source name" (DSN) and some parameters. The data source name is usually defined by the user (for example, "mysqldb"). For MySQL standards, you must set the following parameters:

Server

Database

User

Password

Set the connection parameters, as shown in:



For more parameter details, refer to the official MySQL connection parameter information. Click OK and then click test. In the dialog box that appears, enter the MySQL user name and password and return "the connection DSN wastested successfully, and can be used at this time "is set successfully.

Now you can use various languages in Ubuntu to connect to MySQL through odcb.

 

 

Link: http://linux.chinaitlab.com/admi...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.