Configuring Xtraction to connect to a MySQL Database

Version 3

    Xtraction has the ability to connect to MySQL databases, however for this to work, a MySQL .NET Data Provider needs to be installed on the Xtraction server. The instructions below detail how to configure the Xtraction server to enable connections to a MySQL database.

     

    1. Download and install MySQL Connector/Net on the Xtraction Server

     

    The MySQL .NET Data Provider that has been tested and works with Xtraction is called Connector/Net. The latest release of Connector/Net is available on the MySQL website here. Download the msi file and run this file on the Xtraction server, selecting the Complete install option, installing MySQL Connector/Net to the default folder location.

     

    2. Verify port 3306 is open between Xtraction and MySQL

     

    Verify that port 3306 is open on the MySQL server to allow access to the Xtraction server. The default port is 3306. Below is an example of using the Control Panel in Windows to do this:

     

    MySQL Windows Firewall.png

    3. Open port 3306 between Xtraction and MySQL using command prompt (if needed)

     

    If MySQL is not listed in the above dialog on the MySQL server, you can add it manually from the command line:

    • Open the Command Prompt as an Administrator
    • Enter the following command at the prompt:

    netsh advfirewall firewall add rule name="MySQL" dir=in action=allow protocol=TCP localport=3306

     

    This assumes MySQL is running on the default port of 3306

     

    4. Test connection to a MySQL database in the Data Model Editor

     

    Open the Data Model Editor and add a new MySQL data source to a new or existing data model. Enter the details of your MySQL database server in the Connection Details form (example below). The default port for MySQL is 3306, so if the MySQL server is running on a different port, this needs to be specified in the Additional field as Port=xxxx; where xxxx is the number of the port MySQL is running on.

    MySQLConnection.png

     

    Click the Test button to confirm the connection to the MySQL database is working successfully.

     

    Note: If you experience an error regarding the .NET provider when attempting to test the connection. It is possible you will need to update the version information within the DataModelEditor.exe.config file located within the Xtraction directory (C:\Program Files (x86)\Xtraction Software\Xtraction\Tools by default) to match the version of the MySQL .NET provider on your machine. The version can be updated by altering the 'Version' value to match the version of MySQL .NET provider running on your machine. For example, if you were using MySQL .NET provider 6.9.9 the DataModelEditor.exe.config should match as outlined below:

     

    <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=a1234bc56789d10e"/>