Azure Flexible Server for MySQL source setup guide
This step-by-step guide shows you how to configure Azure Flexible Server for MySQL to replicate data into ClickHouse Cloud using the MySQL ClickPipe. Only one-time ingestion is supported for this service. For common questions around MySQL CDC, see the MySQL FAQs page.
Continuous ingestion via CDC is not supported for this service. Azure Flexible Server for MySQL does not allow configuring the binlog_row_metadata system variable to FULL, which is required for full-featured MySQL CDC in ClickPipes.
Please submit a feature request in the Azure feedback forum, upvote this question, or contact Azure support to request this capability.
Configure a database user
Connect to your Azure Flexible Server for MySQL instance as an admin user and execute the following commands:
-
Create a dedicated user for ClickPipes:
-
Grant schema permissions. The following example shows permissions for the
mysqldatabase. Repeat these commands for each database and host you want to replicate: -
Apply the permission changes:
Configure network access
ClickPipes does not support Azure Private Link connections. If you do not allow public access to your Azure Flexible Server for MySQL instance, you can use an SSH tunnel to connect securely. Azure Private Link will be supported in the future.
Next, you must allow connections to your Azure Flexible Server for MySQL instance from ClickPipes.
- Allow ClickPipes IPs
- Use an SSH tunnel
-
In the Azure Portal, navigate to All resources. Select your Azure Flexible Server for MySQL instance to open the Overview page.
-
Under Settings, select Networking. Ensure Public access is enabled.
-
In the Firewall rules section, enter the list of ClickPipes static IP addresses for the region your service is deployed in.
-
Click Save to save the network security configuration changes.
If you do not allow public access to your Azure Flexible Server for MySQL instance, you must first set up an SSH bastion host to securely tunnel your connection. To set up an SSH bastion host on Azure:
-
Create and start an Azure Virtual Machine (VM) following the official documentation.
- Ensure the VM is in the same Virtual Network (VNet) as your Azure Flexible Server for MySQL instance, or in a peered VNet with connectivity.
- Ensure the VM has a static public IP address. You’ll use this IP address when connecting ClickPipes to your SSH bastion host.
-
Update the Network Security Group (NSG) rules of the SSH bastion host to allow traffic from the list of ClickPipes static IP addresses for the region your service is deployed in.
-
Update the firewall rules of your Azure Flexible Server for MySQL instance to allow traffic from the private IP address of the SSH bastion host.
What's next?
You can now create your ClickPipe and start ingesting data from your Azure Flexible Server for MySQL instance into ClickHouse Cloud. Make sure to note down the connection details you used while setting up your instance, as you will need them during the ClickPipe creation process.