Deploys 1 MySQL PaaS instance and up to 5 read only replicas

Azure Public Test Date Azure Public Test Result

Azure US Gov Last Test Date Azure US Gov Last Test Result

Best Practice Check Cred Scan Check

Deploy To Azure Deploy To Azure US Gov Visualize

Tags: MySQL, Replication, PaaS, Replicas, Read-Only, Microsoft.Resources/deployments, Microsoft.DBforMySQL/servers, firewallRules

Introduction

This ARM template provides a solution to replicate a Azure DB for MySQL instance.

Template description

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.

image

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