Deploys 1 MySQL PaaS instance and up to 5 read only replicas
Tags: MySQL, Replication, PaaS, Replicas, Read-Only, Microsoft.Resources/deployments, Microsoft.DBforMySQL/servers, firewallRules
This ARM template provides a solution to replicate a Azure Database for MySQL instance.
This ARM template will deploy only MySQL PaaS instances. Depending on the information provided it might deploy from 1 to 6 instances. In the case of deploying only 1 (a master and 0 copies) and SQL Instance will be created and no read only copies will be deployed. Any other combination will deploy a master MySQL PaaS instance and between 1 to 5 read only replicas. All of them will be deployed within the same region and resource group.
This implementation is based on what is described in Read replicas in Azure Database for MySQL
How to connect to the services deployed
Use this command line to connect to the MySQL PaaS instances, if using the CloudShell no additional steps will be required. But if connecting from somewhere else you might need to add your IP to the MySQL firewall (Configure Firewall Rules):
mysql -h <fqdnOfTheMySQLInstance> -u <userCreatedForTheMySQLInstance>@<fqdnOfTheMySQLInstance> -p