Skip to content

Instantly share code, notes, and snippets.

@githubutilities
Created October 1, 2015 10:20
Show Gist options
  • Select an option

  • Save githubutilities/cc0e52ef90eff7ccce28 to your computer and use it in GitHub Desktop.

Select an option

Save githubutilities/cc0e52ef90eff7ccce28 to your computer and use it in GitHub Desktop.
MySQL Master Slave Setup

MySQL Master Slave Setup

Master-slave replication keeps the data in sync from master to slave.

Master-slave MySQL servers are typically use master for writing data and slave for reading data so the changes that we make are reflected into slave serversin realtime. You can also use master for reading data while using slave for writing data to different tables. For more detail, please refer to here.

Please refer to MySQL Official Doc to set up MySQL replication.

Data Transfer

  • export -- mysqldump
  • import -- mysql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment