In this video, you will learn how to build a simple MySQL HA cluster including a primary and a secondary node on two ECS instances on Alibaba Cloud. Later, we will use this environment as the source to migrate to Alibaba Cloud cloud managed database, ApsaraDB RDS for MySQL in a HA manner.
【Key Steps You Will See】
1. Install mysql-server both on primary and secondary nodes and do initiating.
2. Change mysql configuration file to define server-id for both and enable Binlog function.
3. Restart mysql service and create a user for replication on primary node, should with replication slave permission.
4. Check connectivity from secondary node.
5. Query master status and set master for secondary nod.
6. Start slave, check both I/O and SQL running status.
7. Create data in primary database and check if all changes be synced to the secondary node.
If you have already have a cluster in your production environment and the database storage is innoDB, you can just skip to the part II in next video for details of migration directly.