Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to add ODBC driver for MySQL in Ubuntu

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

How to add an ODBC driver for MySQL in Ubuntu? I believe many inexperienced people don't know what to do about it. Therefore, this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

First of all, you need to have MySQL, and if you haven't already installed, install the command in one sentence:

$sudo apt-get install mysql-client mysql-server

Install the driver manager for iODBC (front-end interface written by GTK):

$sudo apt-get install iodbc

Install the ODCB connector for MySQL:

$sudo apt-get install libmydobc

Start iODBC:

$sudo iodbcadm-gtk

You should be familiar with this interface, which is almost exactly the same as the ODBC connection settings interface under Windows. To connect to MySQL through ODBC, load the ODBC driver for MySQL, click the "ODBC Drivers" tag card, then click the "Add a driver" button, and then set the following in the "ODBC Driver Add/Setup" dialog box:

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

Driver file name:/usr/lib/odbc/libmyodbc.so

Setup file name:/usr/lib/odbc/libodbcmyS.so

As shown in the following figure:

After setting up, click the "OK" button to load the ODBC driver for MySQL, and then you can create an ODBC connection for MySQL. Click the "User DSN" or "System DSN" tag card to 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 MySQL you just added. Click the "Finish" button, and the "Setup of DSN Unknown" dialog box will pop up. The data source name (Data Source Name,DSN) and some parameters need to be set. The data source name is usually defined by the user (such as "mysqldb"), and the parameters usually need to be set for the MySQL standard:

Server

Database

User

Password

Set the connection parameters as shown in the following figure:

For more parameters, please see the official connection parameters of MySQL. After the setting is complete, click the "OK" button and click the "Test" button. The dialog box asking for the user name and password pops up and enters the user name and password of the MySQL. The setting is successful when the "The connection DSN wastested successfully,and can be used at this time" is returned.

After reading the above, have you mastered how to add an ODBC driver to MySQL in Ubuntu? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report