- Who: Intermediate-Advanced
- What: How To Install MySQL ODBC Drivers to Connect FileMaker 15 to MySQL
- With: FileMaker 15+
- Why: To use data from a MySQL db within a FileMaker solution/table occurrence
This quick guide will describe how to install MySQL ODBC drivers on the Windows platform in order to use the MySQL database as an “External Data Source” in FileMaker Pro 15+. This guide is not a comprehensive guide and is specific to this scenario:
- FileMaker 15+ (there are other guides online for older versions/versions that are not 64bit)
- External data source is MySQL hosted by a 3d party web host
- 64bit Windows server operating system environment
- File is hosted on a FileMaker server
Step 1: Download the ODBC Driver
Since we are using a 64bit FileMaker application in a 64bit Windows server environment, we will be need to install the 64bit version of the MySQL ODBC driver. Simply do a web search for “MySQL ODBC driver” and you should find the “Downloads” page for MySQL ODBC drivers. Download the “Windows (x86, 64-bit)” driver and install it on your FileMaker server.
If you get the error:
Error 1918. Error installing ODBC driver MySQL ODBC 5.1 Driver,
ODBC error 13: The setup routines for the MySQL ODBC 5.1 Driver
could not be loaded due to system error code 126:
The specified module could not be found.
…\myodbc5S.dll)
You can install the 64 bit Visual C++ Redistributable Packages for Visual Studio 2013 to get the necessary dependencies. Then the install should go smoothly.
Step 2: Allow a Remote Connection to MySQL from Your IP
Your MySQL database will not allow a connection to it unless it is specifically allowed. In order to allow access to MySQL from your FileMaker server, you will need to get your FileMaker server’s public IP address. Then, in my scenario, I simply logged into my website’s cpanel and used the “Remote Mysql Database Access” link to add my FileMaker server’s IP address to the list of allowed IPs.
Step 3: Configure the ODBC Connection to Your MySQL Database
On your Windows server, open the ODBC Data Source Administrator by searching for “ODBC” in your Windows search. There is a 32 bit data source administrator and a 64 bit one; be sure to open the 64 bit version.
On the “System DSN” tab, click the Add button. Choose the MySQL ODBC 5.x Unicode Driver. Click Finish; a data source configuration window will open. Provide a name and a description for your data source connection, then add the ODBC (MySQL) server’s IP address. Leave the port with the default of 3306. Ignore the “Named Pipe” radio button and simply fill in the username and password for your MySQL database. If you are connecting to a WordPress database, then this is the same username and password that you would have used in the config page for WordPress. Press the Test button. If you did not allow the remote connection in Step 2 above, this test will fail. After you have a successful test connection, choose the database name to connect to from the drop down box.
Step 4: Create External Data Source in FileMaker
In FileMaker, open a project and go to File->Manage->External Data Sources. Click on the New button. Give the data source connection a name and toggle to the ODBC “type”. Click on the Specify button to fill in the field marked DSN. Choose the data source you created when you set up the ODBC driver and press OK. Fill in the database username and password once again and click OK to close the dialog window.
Your external data source is now available in FileMaker, but the last step is to open the Relationship graph in FileMaker and add a table occurrence using this external data source. Simply click on the Add a table button and in the drop down for Data Source, choose Add ODBC Data Source.