Loading the documentation…

Connect MySQL

The MySQL source reads tables and views from a MySQL server into the Lake. Use this page to fill in each field of the MySQL form. The steps shared by every SQL engine are on Connect a SQL database. For a MariaDB server, see Connect MariaDB.


Prerequisites


Add the source

  1. Open Lake and click Add datasource, or open the New menu in the toolbar above the tree.
  2. Choose MySQL in the picker.
  3. Fill in the General, Connection and Datetime steps as described below.
  4. Click Add.

Connection settings

General step

Name (Mandatory)

Code (Mandatory)

Folder (Optional)

Connection step: Address

Paste connection string (Optional)

Host (Mandatory)

Port (Mandatory)

Database (Optional)

Connection step: Authentication

Username (Mandatory)

Password (Mandatory)

Connection step: Security

SSL/TLS (Optional)

Datetime step

Timezone (Optional)

Datetime values (Optional)

Timezones and datetime values explains both settings in full.


Test and save

  1. On the Connection step, click Test connection. The button reads Testing… while it runs.
  2. Connection test passed means DataMind reached the server and signed in. Connection test failed shows the server's message with a copy button; fix the settings and test again.
  3. On Datetime, check the summary: Name, Server, Database (or All databases), Username and Security.
  4. Click Add. Then import its tables.

The test is optional and never saves the source. To edit or duplicate the source later, see Connect a SQL database.


Questions, answered

Why does each MySQL database show one schema named default?

MySQL has no schemas inside a database: a database and a schema are the same thing. The Lake shows each MySQL database as a database with a single schema called default, and the tables sit under it.

Does the source work with MySQL 8 authentication?

Yes. Users that sign in with caching_sha2_password, the default on MySQL 8, can connect. Enter the user name and password as usual.

Can I limit the source to one database?

Yes. Enter the database name in Database. The Lake then lists only that database; leave the field empty to pick tables from every database the user can read.

My server uses a self-signed certificate. Will SSL/TLS work?

Yes. With SSL/TLS on, the connection is encrypted and the server certificate is not validated, so a self-signed certificate is accepted.

Can I send data back to MySQL?

Yes. MySQL is also offered as a Writeback destination, with the same connection fields. See Add and manage destinations.