Introduction
This article walks through how to connect to a MySQL database using an ODBC driver in FME. While we recommend using the FME MariaDB format, which is compatible with MySQL, these instructions are for users who prefer to connect through ODBC.
For MariaDB connection instructions, refer to: MariaDB/SkySQL (MySQL-compatible) Spatial Reader/Writer.
Requirements
- MySQL ODBC Driver (from Oracle)
- Windows OS
- Access credentials for the MySQL database (host, database name, user, password)
Step-by-step Instructions
1. Download MySQL ODBC Driver
Visit the Oracle website and download the Windows 64-bit MSI installer for the MySQL ODBC driver.
After downloading, launch the installer and follow the prompts to install the driver.
2. Open the ODBC Manager
To create an ODBC data source, navigate to:
C:\Windows\System32\odbcad32.exe
3. Add a New Data Source
- Go to the User DSN tab and click Add.
- Select the MySQL 5.2a ODBC Driver (or similar, depending on version).
- Set a Data Source Name (you will use this name later in FME).
- Enter the required database parameters (host, port, username, etc.).
- Use the Test button to confirm the connection is successful.
4. Connect to MySQL in FME
In FME Workbench, add a new reader:
- Format: ODBC 3.x
-
Parameters:
- Database: Enter the Data Source Name created earlier
- Username/Password: Enter your MySQL Credentials
- Click the ellipsis button next to Table to list available tables
See ODBC 3.x Reader/Writer documentation
5. Verify Connection
If the list of tables appears, FME has successfully connected to your MySQL database.
Troubleshooting
-
Can’t see the ODBC driver?
Ensure the 64-bit version was installed and that you are using the 64-bit ODBC Manager (not the 32-bit one in SysWow64). -
Tables don’t appear in FME?
Double-check that the Data Source Name is entered exactly as configured in the ODBC Manager and that credentials are correct.