Course description

In this hands-on lab, you will configure MySQL Master-Slave replication to enhance database scalability and availability. Starting with Terraform, you'll provision two EC2 instances in the same VPC: one as the master and one as the slave. You'll install and configure MySQL on both servers, create a replication user, and enable binary logging on the master. You'll then capture the master's log position, configure the slave to replicate from the master, and start the replication process. Through testing, you'll verify that data written to the master is automatically synchronized to the slave. By the end, you'll have a fully functional MySQL replication setup ready for production use.

Additionally, all learners receive dedicated online support through our Slack workspace where you can ask questions, get troubleshooting help, and interact with our team throughout the entire project.

Click here to access Slack workspace link

What will i learn?

  • Provision MySQL master and slave instances using Terraform
  • Configure MySQL binary logging and replication settings
  • Create replication users and grant appropriate privileges
  • Capture master log position and configure slave replication
  • Start and verify MySQL replication status
  • Test data synchronization and validate replication integrity
  • Understand real-world use cases for MySQL replication

Requirements

  • An AWS account with Terraform and EC2 access
  • Basic understanding of MySQL and SQL commands
  • Familiarity with Linux command line and SSH
  • Terraform installed locally (optional, can use Cloud Shell)
  • Understanding of networking concepts (VPC, subnets, security groups)

Frequently asked question

Replication improves read scalability, provides data redundancy, and enables failover capabilities. It distributes read queries across multiple servers and ensures data availability if the master fails.

If the master fails, you can promote a slave to become the new master. However, this process is manual unless automated with tools like Orchestrator or built-in MySQL Group Replication.

Yes, MySQL supports filtering replication by database or table using the replicate-do-db and replicate-do-table options in the slave configuration.

Akinola Ojuola

Cloud Solution Architect, DevOps Consultant & Trainer

Akinola Ojuola is a seasoned Cloud Solution Architect, DevOps Consultant and technical trainer with over 20 years of industry expertise. Throughout his career, he has worked with some of the world’s most prominent technology-driven organisations, including IBM, Fujitsu, Walmart, and MasterCard, delivering transformative solutions across various sectors. Akinola has trained and mentored more than 1,000 students across 18 countries on five continents. His commitment to real-world, practical learning has enabled hundreds of learners to launch successful careers in global tech companies. He is passionate about practical, real-world learning. His teaching approach blends deep technical knowledge with hands-on, enterprise-level experience. He holds multiple industry certifications and leads advanced projects in Cloud Architecture, DevOps, DevSecOps, and Artificial Intelligence for both private enterprises and public institutions.Whether you’re just starting or looking to advance your tech career, you’ll gain valuable, job-ready skills under his guidance.

$10

Lectures

1

Skill level

Intermediate

Expiry period

1 Months

Certificate

Yes

Related courses