Create a DSN in the odbc.ini file

A sample DSN named DEVART_MYSQL is created during the driver installation. You can configure and adjust the DSN parameters as needed.

Modify the odbc.ini file

1. Open the odbc.ini file in a text editor, for example, nano.

Use the following command to edit the system-wide DSN.

sudo nano /Library/ODBC/odbc.ini

Use the following command to edit the user-specific DSN:

sudo vi ~/.odbc.ini

2. Add the configuration for your DSN in the odbc.ini file.

[DEVART_MYSQL]
Driver=Devart ODBC Driver for MySQL
Server=your_mysql_server_name
Port=your_mysql_port_number
User ID=your_mysql_user_id 
Password=your_mysql_password
Database=your_mysql_database_name

The odbc.ini file opened in a text editor with entered DSN configuration details.

3. Save and close the file:

3.1. Press CTRL + O to save the file.

3.2. Press CTRL + X to exit the editor.

4. Optional: Test the DSN configuration with isql, a command-line tool for executing SQL interactively or in batches.

isql -v DEVART_MYSQL

Once connected, you can run SQL queries to retrieve data from MySQL.

Note

If the password isn’t saved in the DSN, you’ll be prompted to enter it at runtime when connecting to a data source. If the password is saved in the DSN, leave the User ID and Password fields empty.