{"id":2028,"date":"2018-08-21T18:27:18","date_gmt":"2018-08-21T18:27:18","guid":{"rendered":"http:\/\/dbtut.com\/?p=2028"},"modified":"2018-11-11T21:09:36","modified_gmt":"2018-11-11T21:09:36","slug":"setup-a-simple-mysql-master-slave-replication","status":"publish","type":"post","link":"https:\/\/dbtut.com\/index.php\/2018\/08\/21\/setup-a-simple-mysql-master-slave-replication\/","title":{"rendered":"Setup a simple MySQL Master Slave Replication"},"content":{"rendered":"<h2><\/h2>\n<h2><strong>&#8211; Requirements<\/strong><\/h2>\n<p>This topic assumes that you have user with sudo privileges and have MySQL installed on both server(Master &amp; Slave). If you do not have MySQL server installed, you can install it with\u00a0<a href=\"https:\/\/dbtut.com\/index.php\/2018\/08\/03\/how-to-install-mysql-community-on-ubuntu\/\">this topic .\u00a0<\/a><\/p>\n<p>My Master IP address is <strong>192.168.147.12<\/strong>, and my slave is at <strong>192.168.147.16<\/strong>. You must also make sure you have super privileges on both database to create user, start and stop MySQL Server and Replication<\/p>\n<p>&nbsp;<\/p>\n<h2><strong>&#8211; About MySQL replication<\/strong><\/h2>\n<p>MySQL replication is a process that allows you to easily maintain multiple copies of a MySQL data by having them copied automatically from a master to a slave database. This can helpful for many reasons including facilating a backup for the data,\u00a0although it can also be used for other purposes such as for failover, or analyzing data on the slave in order not to overload the master.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-92\" src=\"https:\/\/mikaelhoundegnon.files.wordpress.com\/2018\/01\/mysql_replication_topology_threads.png?w=640\" alt=\"mysql_replication_topology_threads\" \/><\/p>\n<p>As the master-slave replication is a one-way replication (from master to slave), only the master database is used for the write operations on the slave.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong>&#8211; Configure the Master<\/strong><\/h2>\n<p><strong>1- Open up the mysql configuration file on the master server and add 3 lines below .<\/strong><\/p>\n<pre class=\"lang:default decode:true \"># Replication\r\nserver-id = 1\r\nlog_bin\u00a0 \u00a0 = \/var\/log\/mysql\/mysql-bin.log<\/pre>\n<p><strong>Explanation :\u00a0<\/strong><\/p>\n<p><strong>server-id<\/strong>\u00a0number must be unique and cannot match any other server-id in your replication group.<\/p>\n<p><strong>log_bin :<\/strong>\u00a0is the binary log path, where the slave is going to copy all of the changes that occurs<\/p>\n<p><strong>2- restart MySQL server<\/strong><\/p>\n<pre class=\"lang:default decode:true \">$ &gt;sudo service mysql restart<\/pre>\n<p><strong>3- create a replication user<\/strong><\/p>\n<pre class=\"lang:default decode:true \">$ &gt; mysql -u root -p<\/pre>\n<pre class=\"lang:default decode:true\">mysql&gt; GRANT REPLICATION SLAVE ON *.* TO '<strong>slave_user<\/strong>'@'<strong>192.168.147.16<\/strong>' IDENTIFIED BY 'password';\r\n\r\nmysql&gt; FLUSH PRIVILEGES;<\/pre>\n<p><strong>4- get the position of the binary log<\/strong><\/p>\n<pre class=\"lang:default decode:true \">mysql &gt; SHOW MASTER STATUS;<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2029\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/bin-log-pos.png\" alt=\"\" width=\"547\" height=\"144\" \/><\/p>\n<p><strong>5- Full backup of the database<\/strong><\/p>\n<p>If your data-set is\u00a0too large size, mysqldump will take a long time to finish your logical backup and the restore on the slave will also take a very long time. I recommend to use a binary backup. in the example below i used percona xtrabackup and i streamed the binary backup directly on the slave via ssh. Please follow this article\u00a0<a href=\"https:\/\/www.digitalocean.com\/community\/tutorials\/how-to-create-hot-backups-of-mysql-databases-with-percona-xtrabackup-on-centos-7\">to installed percona xtrabackup<\/a>\u00a0on your Master server and see also\u00a0<a href=\"https:\/\/dbtut.com\/index.php\/2018\/08\/08\/ssh-login-without-password-using-ssh-keygen-ssh-copy-id\/\">how to connect via ssh without password\u00a0\u00a0<\/a>before run below command :<\/p>\n<p>sudo innobackupex \u2013user=root \u2013password=password \u2013no-lock \u2013history \u2013stream=xbstream .\/ | ssh root@192.168.147.16 \u201cxbstream -x -C \/var\/db_backups\/full\/\u201d<\/p>\n<p>However if your data-set is small you can procceed with the mysqldump command below to stream and load the backup directly into the slave server:<\/p>\n<p>mysqldump -u root -p\u00a0 | mysql -u root -p -h\u00a0192.168.147.16<\/p>\n<h2><\/h2>\n<h2><strong>&#8211; Configure the Slave<\/strong><\/h2>\n<p>If you stream the Full backup with xtrabackup tool you have to make sure the data directory on the slave is empty, prepare the binary backup by applying the redo log and restore the backup while the server is stopped.<\/p>\n<pre class=\"lang:default decode:true \">$&gt; sudo service mysql stop\r\n\r\n$&gt;\u00a0innobackupex \u2013apply-log \u2013redo-only \/var\/db_backups\/full\r\n\r\n$&gt; innobackupex \u2013copy-back \/var\/db_backups\/full\r\n\r\n$&gt;\u00a0sudo chown -R mysql:mysql \/var\/lib\/mysql\r\n\r\n$&gt;\u00a0sudo service mysql start<\/pre>\n<p>However, if you generated your backup with mysqldump please skip step above<\/p>\n<p>1<strong>\u2013 Setup the slave by adding lines below at the end of my.cnf file\u00a0<\/strong><\/p>\n<pre class=\"lang:default decode:true\"># Replication\r\nserver-id\u00a0 \u00a0 = 2\r\nlog_bin\u00a0 \u00a0 \u00a0 = \/var\/log\/mysql\/mysql-bin.log\r\nrelay-log\u00a0 \u00a0 = \/var\/log\/mysql\/mysql-relay-bin.log<\/pre>\n<p><strong>2- restart the slave<\/strong><\/p>\n<pre class=\"lang:default decode:true \">sudo service mysql restart<\/pre>\n<p><strong>3-\u00a0setup replication on slave<\/strong><\/p>\n<pre class=\"lang:default decode:true\">$&gt; mysql -u root -p\r\n\r\nmysql&gt; CHANGE MASTER TO MASTER_HOST='192.168.147.12', MASTER_USER='slave_user', MASTER_PASSWORD='password', MASTER_LOG_FILE='mysql-bin.000001', MASTER_LOG_POS=107;<\/pre>\n<p><strong>4- start replication and check the status<\/strong><\/p>\n<p>mysql&gt; START SLAVE<\/p>\n<p>you should check that everything went OK with :<\/p>\n<pre class=\"\">SHOW SLAVE STATUS \\G\r\n         ...\r\n         Slave_IO_Running: Yes\r\n         Slave_SQL_Running: Yes\r\n         ...\r\n         ...<\/pre>\n\n<p>&nbsp;<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_2028\" class=\"pvc_stats all  \" data-element-id=\"2028\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>&#8211; Requirements This topic assumes that you have user with sudo privileges and have MySQL installed on both server(Master &amp; Slave). If you do not have MySQL server installed, you can install it with\u00a0this topic .\u00a0 My Master IP address is 192.168.147.12, and my slave is at 192.168.147.16. You must also make sure you have &hellip;<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_2028\" class=\"pvc_stats all  \" data-element-id=\"2028\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[7],"tags":[1418,1419,1416,1414,1301,1415,1417],"class_list":["post-2028","post","type-post","status-publish","format-standard","","category-mysql","tag-ha","tag-high-availability","tag-master","tag-master-slave","tag-mysql","tag-mysql-replication","tag-slave"],"aioseo_notices":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Setup a simple MySQL Master Slave Replication - Database Tutorials<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dbtut.com\/index.php\/2018\/08\/21\/setup-a-simple-mysql-master-slave-replication\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Setup a simple MySQL Master Slave Replication - Database Tutorials\" \/>\n<meta property=\"og:description\" content=\"&#8211; Requirements This topic assumes that you have user with sudo privileges and have MySQL installed on both server(Master &amp; Slave). If you do not have MySQL server installed, you can install it with\u00a0this topic .\u00a0 My Master IP address is 192.168.147.12, and my slave is at 192.168.147.16. You must also make sure you have &hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dbtut.com\/index.php\/2018\/08\/21\/setup-a-simple-mysql-master-slave-replication\/\" \/>\n<meta property=\"og:site_name\" content=\"Database Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2018-08-21T18:27:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-11-11T21:09:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mikaelhoundegnon.files.wordpress.com\/2018\/01\/mysql_replication_topology_threads.png?w=640\" \/>\n<meta name=\"author\" content=\"Mikael HOUNDEGNON\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@HOUNDEGNON_MIKE\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mikael HOUNDEGNON\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/21\/setup-a-simple-mysql-master-slave-replication\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/21\/setup-a-simple-mysql-master-slave-replication\/\"},\"author\":{\"name\":\"Mikael HOUNDEGNON\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/86e2eaec293d22fa7a83c539631e106f\"},\"headline\":\"Setup a simple MySQL Master Slave Replication\",\"datePublished\":\"2018-08-21T18:27:18+00:00\",\"dateModified\":\"2018-11-11T21:09:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/21\/setup-a-simple-mysql-master-slave-replication\/\"},\"wordCount\":492,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/21\/setup-a-simple-mysql-master-slave-replication\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mikaelhoundegnon.files.wordpress.com\/2018\/01\/mysql_replication_topology_threads.png?w=640\",\"keywords\":[\"HA\",\"High Availability\",\"Master\",\"Master\/Slave\",\"MySQL\",\"MySQL Replication\",\"Slave\"],\"articleSection\":[\"MySQL-MariaDB\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2018\/08\/21\/setup-a-simple-mysql-master-slave-replication\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/21\/setup-a-simple-mysql-master-slave-replication\/\",\"url\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/21\/setup-a-simple-mysql-master-slave-replication\/\",\"name\":\"Setup a simple MySQL Master Slave Replication - Database Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/21\/setup-a-simple-mysql-master-slave-replication\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/21\/setup-a-simple-mysql-master-slave-replication\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mikaelhoundegnon.files.wordpress.com\/2018\/01\/mysql_replication_topology_threads.png?w=640\",\"datePublished\":\"2018-08-21T18:27:18+00:00\",\"dateModified\":\"2018-11-11T21:09:36+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/21\/setup-a-simple-mysql-master-slave-replication\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2018\/08\/21\/setup-a-simple-mysql-master-slave-replication\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/21\/setup-a-simple-mysql-master-slave-replication\/#primaryimage\",\"url\":\"https:\/\/mikaelhoundegnon.files.wordpress.com\/2018\/01\/mysql_replication_topology_threads.png?w=640\",\"contentUrl\":\"https:\/\/mikaelhoundegnon.files.wordpress.com\/2018\/01\/mysql_replication_topology_threads.png?w=640\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/21\/setup-a-simple-mysql-master-slave-replication\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/dbtut.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Setup a simple MySQL Master Slave Replication\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/dbtut.com\/#website\",\"url\":\"https:\/\/dbtut.com\/\",\"name\":\"Database Tutorials\",\"description\":\"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux\",\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/dbtut.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/dbtut.com\/#organization\",\"name\":\"dbtut\",\"url\":\"https:\/\/dbtut.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"width\":223,\"height\":36,\"caption\":\"dbtut\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/86e2eaec293d22fa7a83c539631e106f\",\"name\":\"Mikael HOUNDEGNON\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a7eeb4be963109ed74e93e6afeaead434866af33be2b30acb0a38a42d30cadb6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a7eeb4be963109ed74e93e6afeaead434866af33be2b30acb0a38a42d30cadb6?s=96&d=mm&r=g\",\"caption\":\"Mikael HOUNDEGNON\"},\"description\":\"My name is Mikael HOUNDEGNON. I am an experienced MySQL DBA\/Developer based in the greater Chicago area. You can find out more about me here. I blog here mostly about things I don\u2019t want to forget ? most likely, MySQL Tips. My specialties : MySQL Replication (Master Slave, MultiMaster, Fail over, etc) MySQL Backups MySQL Query Optimization MySQL Performance Tuning MySQL Stored Procedures Storage Engine Tuning Do you have an interesting project idea? Or you just want to chat? Get in touch!\",\"sameAs\":[\"https:\/\/mikaelhoundegnon.wordpress.com\/\",\"https:\/\/x.com\/@HOUNDEGNON_MIKE\"],\"url\":\"https:\/\/dbtut.com\/index.php\/author\/mikaelhoundegnon\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Setup a simple MySQL Master Slave Replication - Database Tutorials","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/dbtut.com\/index.php\/2018\/08\/21\/setup-a-simple-mysql-master-slave-replication\/","og_locale":"en_US","og_type":"article","og_title":"Setup a simple MySQL Master Slave Replication - Database Tutorials","og_description":"&#8211; Requirements This topic assumes that you have user with sudo privileges and have MySQL installed on both server(Master &amp; Slave). If you do not have MySQL server installed, you can install it with\u00a0this topic .\u00a0 My Master IP address is 192.168.147.12, and my slave is at 192.168.147.16. You must also make sure you have &hellip;","og_url":"https:\/\/dbtut.com\/index.php\/2018\/08\/21\/setup-a-simple-mysql-master-slave-replication\/","og_site_name":"Database Tutorials","article_published_time":"2018-08-21T18:27:18+00:00","article_modified_time":"2018-11-11T21:09:36+00:00","og_image":[{"url":"https:\/\/mikaelhoundegnon.files.wordpress.com\/2018\/01\/mysql_replication_topology_threads.png?w=640","type":"","width":"","height":""}],"author":"Mikael HOUNDEGNON","twitter_card":"summary_large_image","twitter_creator":"@HOUNDEGNON_MIKE","twitter_misc":{"Written by":"Mikael HOUNDEGNON","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/21\/setup-a-simple-mysql-master-slave-replication\/#article","isPartOf":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/21\/setup-a-simple-mysql-master-slave-replication\/"},"author":{"name":"Mikael HOUNDEGNON","@id":"https:\/\/dbtut.com\/#\/schema\/person\/86e2eaec293d22fa7a83c539631e106f"},"headline":"Setup a simple MySQL Master Slave Replication","datePublished":"2018-08-21T18:27:18+00:00","dateModified":"2018-11-11T21:09:36+00:00","mainEntityOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/21\/setup-a-simple-mysql-master-slave-replication\/"},"wordCount":492,"commentCount":0,"publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/21\/setup-a-simple-mysql-master-slave-replication\/#primaryimage"},"thumbnailUrl":"https:\/\/mikaelhoundegnon.files.wordpress.com\/2018\/01\/mysql_replication_topology_threads.png?w=640","keywords":["HA","High Availability","Master","Master\/Slave","MySQL","MySQL Replication","Slave"],"articleSection":["MySQL-MariaDB"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/dbtut.com\/index.php\/2018\/08\/21\/setup-a-simple-mysql-master-slave-replication\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/21\/setup-a-simple-mysql-master-slave-replication\/","url":"https:\/\/dbtut.com\/index.php\/2018\/08\/21\/setup-a-simple-mysql-master-slave-replication\/","name":"Setup a simple MySQL Master Slave Replication - Database Tutorials","isPartOf":{"@id":"https:\/\/dbtut.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/21\/setup-a-simple-mysql-master-slave-replication\/#primaryimage"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/21\/setup-a-simple-mysql-master-slave-replication\/#primaryimage"},"thumbnailUrl":"https:\/\/mikaelhoundegnon.files.wordpress.com\/2018\/01\/mysql_replication_topology_threads.png?w=640","datePublished":"2018-08-21T18:27:18+00:00","dateModified":"2018-11-11T21:09:36+00:00","breadcrumb":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/21\/setup-a-simple-mysql-master-slave-replication\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dbtut.com\/index.php\/2018\/08\/21\/setup-a-simple-mysql-master-slave-replication\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/21\/setup-a-simple-mysql-master-slave-replication\/#primaryimage","url":"https:\/\/mikaelhoundegnon.files.wordpress.com\/2018\/01\/mysql_replication_topology_threads.png?w=640","contentUrl":"https:\/\/mikaelhoundegnon.files.wordpress.com\/2018\/01\/mysql_replication_topology_threads.png?w=640"},{"@type":"BreadcrumbList","@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/21\/setup-a-simple-mysql-master-slave-replication\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dbtut.com\/"},{"@type":"ListItem","position":2,"name":"Setup a simple MySQL Master Slave Replication"}]},{"@type":"WebSite","@id":"https:\/\/dbtut.com\/#website","url":"https:\/\/dbtut.com\/","name":"Database Tutorials","description":"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux","publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dbtut.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/dbtut.com\/#organization","name":"dbtut","url":"https:\/\/dbtut.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","width":223,"height":36,"caption":"dbtut"},"image":{"@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/dbtut.com\/#\/schema\/person\/86e2eaec293d22fa7a83c539631e106f","name":"Mikael HOUNDEGNON","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a7eeb4be963109ed74e93e6afeaead434866af33be2b30acb0a38a42d30cadb6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a7eeb4be963109ed74e93e6afeaead434866af33be2b30acb0a38a42d30cadb6?s=96&d=mm&r=g","caption":"Mikael HOUNDEGNON"},"description":"My name is Mikael HOUNDEGNON. I am an experienced MySQL DBA\/Developer based in the greater Chicago area. You can find out more about me here. I blog here mostly about things I don\u2019t want to forget ? most likely, MySQL Tips. My specialties : MySQL Replication (Master Slave, MultiMaster, Fail over, etc) MySQL Backups MySQL Query Optimization MySQL Performance Tuning MySQL Stored Procedures Storage Engine Tuning Do you have an interesting project idea? Or you just want to chat? Get in touch!","sameAs":["https:\/\/mikaelhoundegnon.wordpress.com\/","https:\/\/x.com\/@HOUNDEGNON_MIKE"],"url":"https:\/\/dbtut.com\/index.php\/author\/mikaelhoundegnon\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/2028","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/comments?post=2028"}],"version-history":[{"count":0,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/2028\/revisions"}],"wp:attachment":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media?parent=2028"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/categories?post=2028"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/tags?post=2028"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}