Generic MySQL source setup guide
If you use one of the supported providers (in the sidebar), please refer to the specific guide for that provider.
Enable binary log retention
Binary logs contain information about data modifications made to a MySQL server instance and are required for replication.
MySQL 8.x and newer
To enable binary logging on your MySQL instance, ensure that the following settings are configured:
To check these settings, run the following SQL commands:
If the values don't match, you can run the following SQL commands to set them:
If you have changed the log_bin
setting, you NEED to RESTART the MySQL instance for the changes to take effect.
After changing the settings, continue on with configuring a database user.
MySQL 5.7
To enable binary logging on your MySQL 5.7 instance, ensure that the following settings are configured:
To check these settings, run the following SQL commands:
If the values don't match, you can set them in the config file (typically at /etc/my.cnf
or /etc/mysql/my.cnf
):
You NEED to RESTART the MySQL instance for the changes to take effect.
Column exclusion is not supported for MySQL 5.7 because the binlog_row_metadata
setting wasn't yet introduced.
Configure a database user
Connect to your MySQL instance as the root user and execute the following commands:
-
Create a dedicated user for ClickPipes:
-
Grant schema permissions. The following example shows permissions for the
clickpipes
database. Repeat these commands for each database and host you want to replicate: -
Grant replication permissions to the user:
Make sure to replace clickpipes_user
and some_secure_password
with your desired username and password.
SSL/TLS configuration (recommended)
SSL certificates ensure secure connections to your MySQL database. Configuration depends on your certificate type:
Trusted Certificate Authority (DigiCert, Let's Encrypt, etc.) - no additional configuration needed.
Internal Certificate Authority - Obtain the root CA certificate file from your IT team. In the ClickPipes UI, upload it when creating a new MySQL ClickPipe.
Self-hosted MySQL - Copy the CA certificate from your MySQL server (typically at /var/lib/mysql/ca.pem
) and upload it in the UI when creating a new MySQL ClickPipe. Use the IP address of the server as the host.
Self-hosted MySQL without server access - Contact your IT team for the certificate. As a last resort, use the "Skip Certificate Verification" toggle in ClickPipes UI (not recommended for security reasons).
For more information on SSL/TLS options, check out our FAQ.
What's next?
You can now create your ClickPipe and start ingesting data from your MySQL instance into ClickHouse Cloud. Make sure to note down the connection details you used while setting up your MySQL instance as you will need them during the ClickPipe creation process.