Search code examples
mysqlazuremysql-workbenchazure-mysql-database

Linking MySql Database to Azure


I have a Database using MySql, however i want to migrate to azure MySql which i know is possible, I am new to Azure.

My question if i make changes to the local database, is it possible to automatically update the tables in azure with same changes?

I want to link both Database together and any changes effected on any will affect the other.


Solution

  • This functionality is available and is called Data-In replication. Please see: How to configure Azure Database for MySQL Data-in Replication for instructions on how to configure this functionality. Please see the Limitations and Considerations but the following are the requirements:

    • The master server version must be at least MySQL version 5.6.
    • The master and replica server versions must be the same. For example, both must be MySQL version 5.6 or both must be MySQL version 5.7.
    • Each table must have a primary key.
    • Master server should use the MySQL InnoDB engine.
    • User must have permissions to configure binary logging and create new users on the master server.
    • If the master server has SSL enabled, ensure the SSL CA certificate provided for the domain has been included in the mysql.az_replication_change_master stored procedure. Refer to the following examples and the master_ssl_ca parameter.
    • Ensure the master server's IP address has been added to the Azure Database for MySQL replica server's firewall rules. Update firewall rules using the Azure portal or Azure CLI.
    • Ensure the machine hosting the master server allows both inbound and outbound traffic on port 3306.
    • Ensure the master server has a public IP address, the DNS is publicly accessible, or has a fully qualified domain name (FQDN).