Skip to main content

Connecting to MySQL

To use a Maria or MySQL database with the SQL Query tool we recommend creating the connection in Data Sync and saving it to the connection library. This prevents the need to re-authenticate and supply the connection details each time you want to use the SQL Query Tool. The following will show connecting to MySQL but you can follow the same steps for MariaDB.

To connect to MariaDB or MySQL we recommend using our MySQL connector available from our GitHub site. Data Sync has the ability to install this from the File Menu. Simply got to File > Install Data Connector, and then select MySQL from the dropdown and click OK.

Install Connector

This will install the connector and Data Sync will need closing and re-opening for the changes to take effect.

info

If you get an error saying it could not install the connector because it is "Unable to access folder", then this is because the folder is locked by Ouvvi. Please stop your Ouvvi services and try again.

You can then access the connector by clicking onto Connect Data Source and then going to SQL Database > MySQL. The numbers contained in the brackets are the driver version the connector is targeting. If you need to target a newer driver please contact us via support@simego.com.

Enter in your connection string into the text box or you can build it out using the connection properties.

An example of the connection string you might use is:

Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;

For our connection we use the connection string:
server=mysql;database=Northwind;user id=user;password="password";port=8306;sslmode=None;oldguids=True

MySQL Connection

Then click Connect & Create Library Connection to save it to your connection library.

This will first open a new window where you need to expand the tree to select a table to connect to, click OK once you have selected the table.

MySQL select table

Then enter in a name for your connection and an optional description. Once it has been saved, you can refresh the connection library and under Databases you will now be able to see your MySQL database connection and expand it to select a table to connect to.

MySQL Connection

You can then access the SQL Query Tool by right clicking onto the connection (in the Connection Library Window) and selecting Open SQL Query Tool. This will open the SQL Query Tool with the connection to your MySQL Database and you can start writing a SQL Query as you need to.

Open SQL Query Tool

Connection Properties

If you are connecting from the SQL Query Tool, then at a minimum you will need to enter the following into the connection properties window:

Server
The server address of your MariaDB.

Database
The MariaDB SQL database to connect to.

Port
The port to use for TCP/IP connections.

UserId
The user ID to be used when connecting to the server.

Password
The password to be used when connecting to the server.

SSLMode
The SSL Properties for the connection. Set this to 'None' if you do not have any.

MySQL Connection