{"id":4864,"date":"2024-05-07T12:00:46","date_gmt":"2024-05-07T05:00:46","guid":{"rendered":"https:\/\/longvan.net\/cong-dong\/?p=4864"},"modified":"2024-08-27T15:34:33","modified_gmt":"2024-08-27T08:34:33","slug":"huong-dan-cau-hinh-mysql-master-master-replication","status":"publish","type":"post","link":"https:\/\/longvan.net\/cong-dong\/huong-dan-cau-hinh-mysql-master-master-replication\/","title":{"rendered":"H\u01b0\u1edbng d\u1eabn c\u1ea5u h\u00ecnh MySQL Master-Master Replication"},"content":{"rendered":"<h3>I. Gi\u1edbi thi\u1ec7u gi\u1ea3i ph\u00e1p<\/h3>\n<p><strong>L\u01b0u \u00fd<\/strong>: thi\u1ebft l\u1eadp n\u00e0y mang l\u1ea1i m\u1ed9t s\u1ed1 v\u1ea5n \u0111\u1ec1 ti\u1ec1m \u1ea9n khi thay \u0111\u1ed5i d\u1eef li\u1ec7u \u0111ang x\u1ea3y ra tr\u00ean c\u1ea3 hai nodes. N\u00f3 c\u00f3 th\u1ec3 g\u1eb7p v\u1ea5n \u0111\u1ec1 n\u1ebfu c\u00f3 <strong>table<\/strong>&nbsp;v\u1edbi c\u00e1c tr\u01b0\u1eddng <strong>auto_increment.<\/strong> N\u1ebfu c\u1ea3 hai m\u00e1y ch\u1ee7 \u0111ang ch\u00e8n ho\u1eb7c c\u1eadp nh\u1eadt trong c\u00f9ng m\u1ed9t <strong>table<\/strong>, vi\u1ec7c sao ch\u00e9p s\u1ebd b\u1ecb h\u1ecfng tr\u00ean m\u1ed9t m\u00e1y ch\u1ee7 do l\u1ed7i&nbsp;&#8220;<strong>duplicate entry<\/strong>&#8220;. \u0110\u1ec3 gi\u1ea3i quy\u1ebft v\u1ea5n \u0111\u1ec1 n\u00e0y, b\u1ea1n c\u1ea7n thi\u1ebft l\u1eadp &#8220;<strong>auto_increment_increment&#8221;<\/strong> v\u00e0 &#8220;<strong>auto_increment_offset&#8221;<\/strong>.<\/p>\n<p>Trong tr\u01b0\u1eddng h\u1ee3p n\u00e0y s\u1ebd s\u1eed d\u1ee5ng thi\u1ebfp l\u1eadp&nbsp;<strong>master-master<\/strong> l\u00e0m b\u1ea3n sao <strong>ch\u1ee7 \u0111\u1ed9ng<\/strong> &#8211; <strong>th\u1ee5 \u0111\u1ed9ng<\/strong>. N\u1ebfu \u0111\u00e3 bi\u1ebft ch\u1ec9 c\u00f3 m\u1ed9t nodes \u0111ang th\u1ef1c hi\u1ec7n s\u1eeda \u0111\u1ed5i d\u1eef li\u1ec7u, b\u1ea1n c\u00f3 th\u1ec3 tr\u00e1nh \u0111\u01b0\u1ee3c nhi\u1ec1u v\u1ea5n \u0111\u1ec1 c\u00f3 th\u1ec3 x\u1ea3y ra. Trong tr\u01b0\u1eddng h\u1ee3p d\u1eef li\u1ec7u chuy\u1ec3n \u0111\u1ed5i d\u1ef1 ph\u00f2ng, &#8220;<strong>slave<\/strong>&#8221; c\u00f3 th\u1ec3 d\u1ec5 d\u00e0ng \u0111\u01b0\u1ee3c \u0111\u01b0a l\u00ean l\u00e0m d\u1eef li\u1ec7u ch\u00ednh(master). S\u1eeda \u0111\u1ed5i d\u1eef li\u1ec7u \u0111\u01b0\u1ee3c t\u1ef1 \u0111\u1ed9ng sao ch\u00e9p sang nodes kh\u00f4ng th\u00e0nh c\u00f4ng khi n\u00f3 sao l\u01b0u.<\/p>\n<p><b>M\u00f4 h\u00ecnh<\/b><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"wp-image-4904 size-full aligncenter\" src=\"https:\/\/longvan.net\/cong-dong\/wp-content\/uploads\/2024\/05\/replication-model-1.png\" alt=\"\" width=\"402\" height=\"299\" srcset=\"https:\/\/longvan.net\/cong-dong\/wp-content\/uploads\/2024\/05\/replication-model-1.png 402w, https:\/\/longvan.net\/cong-dong\/wp-content\/uploads\/2024\/05\/replication-model-1-300x223.png 300w\" sizes=\"auto, (max-width: 402px) 100vw, 402px\" \/><\/p>\n<h3>II. Chu\u1ea9n b\u1ecb<\/h3>\n<p>\u1ede \u0111\u00e2y ta c\u1ea7n c\u00f3 hai m\u00e1y ch\u1ee7 \u0111\u00e3 c\u00e0i \u0111\u1eb7t s\u1eb5n MySQL c\u00f3 c\u00f9ng phi\u00ean b\u1ea3n \u0111\u1ec3 c\u1ea5u h\u00ecnh. Trong b\u00e0i h\u01b0\u1edbng d\u1eabn n\u00e0y, Long V\u00e2n s\u1eed d\u1ee5ng 2 m\u00e1y ch\u1ee7 MySQL \u0111\u01b0\u1ee3c thi\u1ebft l\u1eadp nh\u01b0 sau:<\/p>\n<ul>\n<li><strong>H\u1ec7 \u0111i\u1ec1u h\u00e0nh<\/strong>: Ubuntu 22.04<\/li>\n<li><strong>C\u01a1 s\u1edf d\u1eef li\u1ec7u<\/strong>: MySQL 8.0.36<\/li>\n<\/ul>\n<h3>III. C\u1ea5u h\u00ecnh<strong><br \/>\n<\/strong><\/h3>\n<p><strong>C<\/strong><strong>\u00e0i \u0111\u1eb7t MySQL <\/strong><strong>(tr\u00ean 2 m\u00e1y ch\u1ee7)<\/strong><\/p>\n<pre style=\"color: #313131; border-radius: 4px; padding: 0.65em 0.65em;\"><code class=\"language-shell\"><span class=\"token function\">$ wget https:\/\/dev.mysql.com\/get\/mysql-apt-config_0.8.29-1_all.deb\n$ sudo dpkg -i mysql-apt-config_0.8.29-1_all.deb\n$ apt-cache search mysql-server\n$ sudo apt install mysql-server-8.0 -y<\/span> <\/code><\/pre>\n<p><strong>D\u1eebng MySQL tr\u00ean c\u1ea3 hai m\u00e1y ch\u1ee7:<\/strong><\/p>\n<pre style=\"color: #313131; border-radius: 4px; padding: 0.65em 0.65em;\"><code class=\"language-shell\"><span class=\"token function\">sudo systemctl stop mysql.service<\/span> <\/code><\/pre>\n<h3 style=\"font-family: inherit; font-weight: bold; font-size: 1em; line-height: 1.4em; border-bottom: 2px dashed #ededed;\">MASTER1 &#8211; (<strong>B\u01b0\u1edbc 1<\/strong>. <strong>C\u1ea5u h\u00ecnh tr\u00ean m\u00e1y ch\u1ee7 \u0111\u1ea7u ti\u00ean<\/strong>)<\/h3>\n<p>Ch\u1ec9nh s\u1eeda t\u1ec7p c\u1ea5u h\u00ecnh <strong>\/etc\/mysql\/mysql.conf.d\/mysqld.cnf<\/strong><\/p>\n<pre style=\"color: #313131; border-radius: 4px; padding: 0.65em 0.65em;\"><code class=\"language-shell\"><span class=\"token function\">#bind-address           = 127.0.0.1\nserver-id = 200\nreport_host = master1\nlog_bin = \/var\/log\/mysql\/mariadb-bin\nlog_bin_index = \/var\/log\/mysql\/mariadb-bin.index\nrelay_log = \/var\/log\/mysql\/relay-bin\nrelay_log_index = \/var\/log\/mysql\/relay-bin.index\n#replicate-do-db = test_db\nauto_increment_increment = 5\nauto_increment_offset = 1<\/span> <\/code><\/pre>\n<p><span style=\"color: blue;\">#bind-address = 127.0.0.1<\/span><br \/>\nTheo m\u1eb7c \u0111\u1ecbnh, MySQL ch\u1ec9 cho ph\u00e9p c\u00e1c k\u1ebft n\u1ed1i t\u1eeb m\u00e1y ch\u1ee7 c\u1ee5c b\u1ed9. Ch\u00fang ta c\u1ea7n x\u00f3a ho\u1eb7c # d\u00f2ng n\u00e0y l\u1ea1i \u0111\u1ec3 cho ph\u00e9p k\u1ebft n\u1ed1i t\u1eeb c\u00e1c m\u00e1y ch\u1ee7 kh\u00e1c. M\u1ee5c n\u00e0y r\u1ea5t quan tr\u1ecdng \u0111\u1ec3 m\u1edf r\u1ed9ng k\u1ebft n\u1ed1i \u0111\u1ec3 ho\u1ea1t \u0111\u1ed9ng.<\/p>\n<p><span style=\"color: blue;\">server-id = 200<br \/>\nreport_host = master1<\/span><br \/>\nThi\u1ebft l\u1eadp ID duy nh\u1ea5t cho m\u00e1y ch\u1ee7. \u1ede h\u01b0\u1edbng d\u1eabn n\u00e0y s\u1ebd thi\u1ebft l\u1eadp s\u1eed d\u1ee5ng ch\u1eef s\u1ed1 cu\u1ed1i c\u1ee7a \u0111\u1ecba ch\u1ec9 IP. T\u00f9y ch\u1ecdn, ta c\u00f3 th\u1ec3 thi\u1ebft l\u1eadp tham s\u1ed1 report_host cho c\u00e1c m\u00e1y ch\u1ee7 c\u00f3 th\u1ec3 giao ti\u1ebfp l\u1eabn nhau th\u00f4ng qua hostnames \u0111\u00e3 thi\u1ebft \u0111\u1eb7t.<\/p>\n<p><span style=\"color: blue;\">log_bin = \/var\/log\/mysql\/mariadb-bin<br \/>\nlog_bin_index = \/var\/log\/mysql\/mariadb-bin.index<\/span><br \/>\nCho ph\u00e9p ghi nh\u1eadt k\u00fd nh\u1ecb ph\u00e2n (Enable binary logging).<\/p>\n<p><span style=\"color: blue;\">relay_log = \/var\/log\/mysql\/relay-bin<br \/>\nrelay_log_index = \/var\/log\/mysql\/relay-bin.index<\/span><br \/>\nCho ph\u00e9p t\u1ea1o t\u1ec7p relay_log. C\u00e1c Events trong c\u00e1c nh\u1eadt k\u00fd nh\u1ecb ph\u00e2n(master\u2019s binary log) s\u1ebd \u0111\u01b0\u1ee3c ghi v\u00e0o slave relay log.<\/p>\n<p><span style=\"color: green;\">replicate-do-db = testdb<\/span><br \/>\nV\u1edbi t\u00f9y ch\u1ec9nh n\u00e0y, ta c\u00f3 th\u1ec3 thi\u1ebft l\u1eadp v\u1edbi MySQL c\u01a1 s\u1edf d\u1eef li\u1ec7u n\u00e0o c\u1ea7n sao ch\u00e9p. Tham s\u1ed1 n\u00e0y l\u00e0 <span style=\"color: red;\">t\u00f9y ch\u1ecdn.<\/span><\/p>\n<p>Ti\u1ebfp \u0111\u1ebfn ta c\u1ea7n kh\u1edfi \u0111\u1ed9ng m\u00e1y ch\u1ee7 MySQL<\/p>\n<pre style=\"color: #313131; border-radius: 4px; padding: 0.65em 0.65em;\"><code class=\"language-shell\"><span class=\"token function\">sudo systemctl start mysql.service <\/span> <\/code><\/pre>\n<p>\u0110\u0103ng nh\u1eadp v\u00e0o root v\u00e0 t\u1ea1o ng\u01b0\u1eddi d\u00f9ng \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 sao ch\u00e9p d\u1eef li\u1ec7u gi\u1eefa c\u00e1c m\u00e1y ch\u1ee7. C\u1ea5p quy\u1ec1n th\u00edch h\u1ee3p cho ng\u01b0\u1eddi d\u00f9ng.<\/p>\n<pre style=\"color: #313131; border-radius: 4px; padding: 0.65em 0.65em;\"><code class=\"language-shell\"><span class=\"token function\">$ sudo mysql -u root -p\nmysql&gt; create user 'replusr'@'%' identified by 'replusr';\nmysql&gt; grant replication slave on *.* to 'replusr'@'%';<\/span> <\/code><\/pre>\n<p>B\u01b0\u1edbc cu\u1ed1i c\u00f9ng, ki\u1ec3m tra th\u00f4ng tin tr\u1ea1ng th\u00e1i t\u1ec7p binary log v\u00ec ch\u00fang ta s\u1ebd s\u1eed d\u1ee5ng th\u00f4ng tin n\u00e0y \u0111\u1ec3 b\u1eaft \u0111\u1ea7u sao ch\u00e9p(replication) tr\u00ean m\u1ed9t m\u00e1y ch\u1ee7(node) kh\u00e1c.<\/p>\n<pre style=\"color: #313131; border-radius: 4px; padding: 0.65em 0.65em;\"><code class=\"language-shell\"><span class=\"token function\">mysql&gt; show master status;\n+--------------------+----------+--------------+------------------+-------------------+\n| File               | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |\n+--------------------+----------+--------------+------------------+-------------------+\n| mariadb-bin.000017 |      611 |              |                  |                   |\n+--------------------+----------+--------------+------------------+-------------------+<\/span> <\/code><\/pre>\n<h3 style=\"font-family: inherit; font-weight: bold; font-size: 1em; line-height: 1.4em; border-bottom: 2px dashed #ededed;\">MASTER2 (<strong>B\u01b0\u1edbc 2. C\u1ea5u h\u00ecnh tr\u00ean m\u00e1y ch\u1ee7 th\u1ee9 hai<\/strong>)<\/h3>\n<p>Ch\u1ec9nh s\u1eeda t\u1ec7p c\u1ea5u h\u00ecnh <strong>\/etc\/mysql\/mysql.conf.d\/mysqld.cnf<\/strong><\/p>\n<pre style=\"color: #313131; border-radius: 4px; padding: 0.65em 0.65em;\"><code class=\"language-shell\"><span class=\"token function\">#bind-address           = 127.0.0.1\nserver-id = 201\nreport_host = master2\nlog_bin = \/var\/log\/mysql\/mariadb-bin\nlog_bin_index = \/var\/log\/mysql\/mariadb-bin.index\nrelay_log = \/var\/log\/mysql\/relay-bin\nrelay_log_index = \/var\/log\/mysql\/relay-bin.index\n#replicate-do-db = test_db\nauto_increment_increment = 5\nauto_increment_offset = 1<\/span> <\/code><\/pre>\n<p>Kh\u1edfi \u0111\u1ed9ng m\u00e1y ch\u1ee7 MySQL<\/p>\n<pre style=\"color: #313131; border-radius: 4px; padding: 0.65em 0.65em;\"><code class=\"language-shell\"><span class=\"token function\">sudo systemctl start mysql.service <\/span> <\/code><\/pre>\n<p>t\u1ea1o ng\u01b0\u1eddi d\u00f9ng \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng \u0111\u1ec3 sao ch\u00e9p d\u1eef li\u1ec7u v\u00e0 c\u1ea5p quy\u1ec1n th\u00edch h\u1ee3p cho ng\u01b0\u1eddi d\u00f9ng.<\/p>\n<pre style=\"color: #313131; border-radius: 4px; padding: 0.65em 0.65em;\"><code class=\"language-shell\"><span class=\"token function\">$ sudo mysql -u root -p\nmysql&gt; create user 'replusr'@'%' identified by 'replusr';\nmysql&gt; grant replication slave on *.* to 'replusr'@'%';<\/span> <\/code><\/pre>\n<p>\u0110\u1ec3 b\u1eaft \u0111\u1ea7u sao ch\u00e9p, nh\u1eadp l\u1ec7nh ph\u00eda b\u00ean d\u01b0\u1edbi<\/p>\n<pre style=\"color: #313131; border-radius: 4px; padding: 0.65em 0.65em;\"><code class=\"language-shell\"><span class=\"token function\">mysql&gt; STOP SLAVE;\nmysql&gt; CHANGE MASTER TO MASTER_HOST='master1', MASTER_USER='replusr', MASTER_PASSWORD='replusr', MASTER_LOG_FILE='mariadb-bin.000017', MASTER_LOG_POS=611;\nmysql&gt; START SLAVE;<\/span> <\/code><\/pre>\n<p>\u0110\u1ed1i v\u1edbi MASTER_LOG_FILE v\u00e0 MASTER_LOG_POS. \u0110\u00e3 s\u1eed d\u1ee5ng th\u00f4ng tin t\u1eeb &#8220;show master status&#8221; \u1edf \u0111\u1ea7u ti\u00ean.<\/p>\n<p>Ki\u1ec3m tra th\u00f4ng tin tr\u1ea1ng th\u00e1i c\u1ee7a Slave<\/p>\n<pre style=\"color: #313131; border-radius: 4px; padding: 0.65em 0.65em;\"><code class=\"language-shell\"><span class=\"token function\">mysql&gt; SHOW SLAVE STATUS\\G\n*************************** 1. row ***************************\n               Slave_IO_State: Waiting for source to send event\n                  Master_Host: master1\n                  Master_User: replusr\n                  Master_Port: 3306\n                Connect_Retry: 60\n              Master_Log_File: mariadb-bin.000017\n          Read_Master_Log_Pos: 611\n               Relay_Log_File: relay-bin.000028\n                Relay_Log_Pos: 831\n        Relay_Master_Log_File: mariadb-bin.000017\n             Slave_IO_Running: Yes\n            Slave_SQL_Running: Yes\n              Replicate_Do_DB:\n          Replicate_Ignore_DB:\n           Replicate_Do_Table:\n       Replicate_Ignore_Table:\n      Replicate_Wild_Do_Table:\n  Replicate_Wild_Ignore_Table:\n                   Last_Errno: 0\n                   Last_Error:\n                 Skip_Counter: 0\n          Exec_Master_Log_Pos: 611\n              Relay_Log_Space: 1206\n              Until_Condition: None\n               Until_Log_File:\n                Until_Log_Pos: 0\n           Master_SSL_Allowed: No\n           Master_SSL_CA_File:\n           Master_SSL_CA_Path:\n              Master_SSL_Cert:\n            Master_SSL_Cipher:\n               Master_SSL_Key:\n        Seconds_Behind_Master: 0\nMaster_SSL_Verify_Server_Cert: No\n                Last_IO_Errno: 0\n                Last_IO_Error:\n               Last_SQL_Errno: 0\n               Last_SQL_Error:\n  Replicate_Ignore_Server_Ids:\n             Master_Server_Id: 200\n                  Master_UUID: c7f19e4d-0605-11ef-8f6e-005056a5dd4e\n             Master_Info_File: mysql.slave_master_info\n                    SQL_Delay: 0\n          SQL_Remaining_Delay: NULL\n      Slave_SQL_Running_State: Replica has read all relay log; waiting for more updates\n           Master_Retry_Count: 86400\n                  Master_Bind:\n      Last_IO_Error_Timestamp:\n     Last_SQL_Error_Timestamp:\n               Master_SSL_Crl:\n           Master_SSL_Crlpath:\n           Retrieved_Gtid_Set:\n            Executed_Gtid_Set:\n                Auto_Position: 0\n         Replicate_Rewrite_DB:\n                 Channel_Name:\n           Master_TLS_Version:\n       Master_public_key_path:\n        Get_master_public_key: 0\n            Network_Namespace: <\/span> <\/code><\/pre>\n<p>L\u01b0u \u00fd Read_Master_Log_Pos v\u00e0 Exec_Master_Log_Pos \u0111\u01b0\u1ee3c \u0111\u1ed3ng b\u1ed9 h\u00f3a, \u0111\u00e2y l\u00e0 d\u1ea5u hi\u1ec7u t\u1ed1t cho c\u01a1 s\u1edf d\u1eef li\u1ec7u c\u1ee7a ch\u00fang ta \u0111ang \u0111\u1ed3ng b\u1ed9 h\u00f3a<\/p>\n<p>Ki\u1ec3m tra th\u00f4ng tin tr\u1ea1ng th\u00e1i v\u1ec1 t\u1ec7p binary logs c\u1ee7a m\u00e1y ch\u1ee7 MASTER2. Ch\u00fang ta s\u1ebd c\u1ea7n th\u00f4ng tin n\u00e0y \u0111\u1ec3 b\u1eaft \u0111\u1ea7u sao ch\u00e9p tr\u00ean m\u00e1y ch\u1ee7 MASTER1.<\/p>\n<pre style=\"color: #313131; border-radius: 4px; padding: 0.65em 0.65em;\"><code class=\"language-shell\">mysql&gt; show master status;\n+--------------------+----------+--------------+------------------+-------------------+\n| File               | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |\n+--------------------+----------+--------------+------------------+-------------------+\n| mariadb-bin.000016 |     1498 |              |                  |                   |\n+--------------------+----------+--------------+------------------+-------------------+<\/code><\/pre>\n<h3 style=\"font-family: inherit; font-weight: bold; font-size: 1em; line-height: 1.4em; border-bottom: 2px dashed #ededed;\">MASTER1 &#8211; (<strong>B\u01b0\u1edbc 3. Sao ch\u00e9p d\u1eef li\u1ec7u t\u1eeb MASTER2 sang MASTER1<\/strong>)<\/h3>\n<p>B\u1eaft \u0111\u1ea7u replication d\u1eef li\u1ec7u t\u1eeb MASTER2 sang MASTER1<\/p>\n<pre style=\"color: #313131; border-radius: 4px; padding: 0.65em 0.65em;\"><code class=\"language-shell\"><span class=\"token function\">mysql&gt; STOP SLAVE;\nmysql&gt; CHANGE MASTER TO MASTER_HOST='master2', MASTER_USER='replusr', MASTER_PASSWORD='replusr', MASTER_LOG_FILE='mariadb-bin.000016', MASTER_LOG_POS=1498;\nmysql&gt; START SLAVE;<\/span> <\/code><\/pre>\n<pre style=\"color: #313131; border-radius: 4px; padding: 0.65em 0.65em;\"><code class=\"language-shell\"><span class=\"token function\">mysql&gt; SHOW SLAVE STATUS\\G\n*************************** 1. row ***************************\n               Slave_IO_State: Waiting for source to send event\n                  Master_Host: master2\n                  Master_User: replusr\n                  Master_Port: 3306\n                Connect_Retry: 60\n              Master_Log_File: mariadb-bin.000016\n          Read_Master_Log_Pos: 1498\n               Relay_Log_File: relay-bin.000030\n                Relay_Log_Pos: 328\n        Relay_Master_Log_File: mariadb-bin.000016\n             Slave_IO_Running: Yes\n            Slave_SQL_Running: Yes\n              Replicate_Do_DB: test_db\n          Replicate_Ignore_DB:\n           Replicate_Do_Table:\n       Replicate_Ignore_Table:\n      Replicate_Wild_Do_Table:\n  Replicate_Wild_Ignore_Table:\n                   Last_Errno: 0\n                   Last_Error:\n                 Skip_Counter: 0\n          Exec_Master_Log_Pos: 1498\n              Relay_Log_Space: 883\n              Until_Condition: None\n               Until_Log_File:\n                Until_Log_Pos: 0\n           Master_SSL_Allowed: No\n           Master_SSL_CA_File:\n           Master_SSL_CA_Path:\n              Master_SSL_Cert:\n            Master_SSL_Cipher:\n               Master_SSL_Key:\n        Seconds_Behind_Master: 0\nMaster_SSL_Verify_Server_Cert: No\n                Last_IO_Errno: 0\n                Last_IO_Error:\n               Last_SQL_Errno: 0\n               Last_SQL_Error:\n  Replicate_Ignore_Server_Ids:\n             Master_Server_Id: 201\n                  Master_UUID: c0db3da1-0605-11ef-8335-005056a5e4fe\n             Master_Info_File: mysql.slave_master_info\n                    SQL_Delay: 0\n          SQL_Remaining_Delay: NULL\n      Slave_SQL_Running_State: Replica has read all relay log; waiting for more updates\n           Master_Retry_Count: 86400\n                  Master_Bind:\n      Last_IO_Error_Timestamp:\n     Last_SQL_Error_Timestamp:\n               Master_SSL_Crl:\n           Master_SSL_Crlpath:\n           Retrieved_Gtid_Set:\n            Executed_Gtid_Set:\n                Auto_Position: 0\n         Replicate_Rewrite_DB:\n                 Channel_Name:\n           Master_TLS_Version:\n       Master_public_key_path:\n        Get_master_public_key: 0\n            Network_Namespace:<\/span> <\/code><\/pre>\n<p>M\u1ecdi th\u1ee9 ho\u1ea1t \u0111\u1ed9ng t\u1ed1t.<br \/>\nH\u00e3y th\u1eed nghi\u1ec7m t\u1ea1o b\u1ea3ng v\u00e0 ch\u00e8n m\u1ed9t s\u1ed1 h\u00e0ng \u0111\u1ec3 ki\u1ec3m tra b\u1ea3n sao.<\/p>\n<p>\u1ede th\u1eed nghi\u1ec7m n\u00e0y m\u00ecnh s\u1ebd c\u00f3 th\u00ed d\u1ee5 \u0111\u01a1n gi\u1ea3n \u1edf server <strong>MASTER1<\/strong> s\u1ebd tri\u1ec3n khai m\u1ed9t trang c\u01a1 b\u1ea3n wordpress v\u00e0 thay \u0111\u1ed5i home, siteurl trong b\u1ea3ng wp_options<\/p>\n<h3 style=\"font-family: inherit; font-weight: bold; font-size: 1em; line-height: 1.4em; border-bottom: 2px dashed #ededed;\">MASTER1 &#8211; (<strong>B\u01b0\u1edbc 4. Ki\u1ec3m tra th\u1eed thay \u0111\u1ed5i d\u1eef li\u1ec7u tr\u00ean m\u00e1y ch\u1ee7 MASTER1<\/strong>)<\/h3>\n<pre style=\"color: #313131; border-radius: 4px; padding: 0.65em 0.65em;\"><code class=\"language-shell\"><span class=\"token function\">mysql&gt; use test_db;\nReading table information for completion of table and column names\nYou can turn off this feature to get a quicker startup with -A\n\nDatabase changed\nmysql&gt; SELECT option_name, option_value FROM wp_options WHERE option_name IN ('siteurl', 'home');\n+-------------+-----------------+\n| option_name | option_value    |\n+-------------+-----------------+\n| home        | http:\/\/test.com |\n| siteurl     | http:\/\/test.com |\n+-------------+-----------------+\n2 rows in set (0.00 sec)\n\nmysql&gt; UPDATE wp_options SET option_value = 'http:\/\/test123.com' WHERE option_name IN ('siteurl', 'home');\nQuery OK, 2 rows affected (0.01 sec)\nRows matched: 2  Changed: 2  Warnings: 0<\/span> <\/code><\/pre>\n<h3 style=\"font-family: inherit; font-weight: bold; font-size: 1em; line-height: 1.4em; border-bottom: 2px dashed #ededed;\">MASTER2 &#8211; (<strong>B\u01b0\u1edbc 5. Ki\u1ec3m tra d\u1eef li\u1ec7u tr\u00ean c\u01a1 s\u1edf d\u1eef li\u1ec7u c\u1ee7a MASTER2<\/strong>)<\/h3>\n<pre style=\"color: #313131; border-radius: 4px; padding: 0.65em 0.65em;\"><code class=\"language-shell\"><span class=\"token function\">mysql&gt; use test_db;\nReading table information for completion of table and column names\nYou can turn off this feature to get a quicker startup with -A\n\nDatabase changed\nmysql&gt; SELECT option_name, option_value FROM wp_options WHERE option_name IN ('siteurl', 'home');\n+-------------+--------------------+\n| option_name | option_value       |\n+-------------+--------------------+\n| home        | http:\/\/test123.com |\n| siteurl     | http:\/\/test123.com |\n+-------------+--------------------+\n2 rows in set (0.00 sec)<\/span> <\/code><\/pre>\n<p>Ta c\u00f3 th\u1ec3 th\u1ea5y n\u1ed9i dung b\u1ea3ng \u0111\u00e3 \u0111\u01b0\u1ee3c sao ch\u00e9p th\u00e0nh c\u00f4ng.<\/p>\n<p>N\u1ebfu c\u00f3 s\u1ef1 c\u1ed1 \u1edf <strong>MASTER1<\/strong>, trong khi \u0111\u00f3&nbsp;<strong>MASTER2&nbsp;<\/strong>v\u1eabn ho\u1ea1t \u0111\u1ed9ng v\u00e0 ghi d\u1eef li\u1ec7u b\u00ecnh th\u01b0\u1eddng s\u1ebd c\u00f3 th\u00f4ng b\u00e1o l\u1ed7i Last_IO_Error trong l\u00fac <strong>MASTER1&nbsp;<\/strong>kh\u00f4ng ho\u1ea1t \u0111\u1ed9ng.<\/p>\n<p>Sau \u0111\u00f3 kh\u1edfi \u0111\u1ed9ng l\u1ea1i&nbsp;<strong>MASTER1<\/strong>. M\u00e1y ch\u1ee7 MySQL v\u00e0 replication MySQL s\u1ebd t\u1ef1 \u0111\u1ed9ng k\u00edch ho\u1ea1t v\u00e0 \u0111\u1ed3ng b\u1ed9 d\u1eef li\u1ec7u <strong>MASTER1&nbsp;<\/strong>theo k\u1ecbp v\u1edbi&nbsp;<strong>MASTER2.<\/strong><\/p>\n<p>Nh\u01b0 v\u1eady Long V\u00e2n \u0111\u00e3 ho\u00e0n th\u00e0nh h\u01b0\u1edbng d\u1eabn c\u1ea5u h\u00ecnh MySQL Master-Master Replication, ch\u00fac Qu\u00fd Kh\u00e1ch th\u00e0nh c\u00f4ng!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I. Gi\u1edbi thi\u1ec7u gi\u1ea3i ph\u00e1p L\u01b0u \u00fd: thi\u1ebft l\u1eadp n\u00e0y mang l\u1ea1i m\u1ed9t s\u1ed1 v\u1ea5n \u0111\u1ec1 ti\u1ec1m \u1ea9n khi thay \u0111\u1ed5i d\u1eef li\u1ec7u \u0111ang x\u1ea3y ra tr\u00ean c\u1ea3 hai nodes. N\u00f3 c\u00f3 th\u1ec3 g\u1eb7p v\u1ea5n \u0111\u1ec1 n\u1ebfu c\u00f3 table&nbsp;v\u1edbi c\u00e1c tr\u01b0\u1eddng auto_increment. N\u1ebfu c\u1ea3 hai m\u00e1y ch\u1ee7 \u0111ang ch\u00e8n ho\u1eb7c c\u1eadp nh\u1eadt trong c\u00f9ng m\u1ed9t [&hellip;]<\/p>\n","protected":false},"author":17,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_oasis_is_in_workflow":0,"_oasis_original":0,"footnotes":""},"categories":[4],"tags":[5,326,150],"class_list":["post-4864","post","type-post","status-publish","format-standard","hentry","category-linux","tag-linux","tag-master-master","tag-mysql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>H\u01b0\u1edbng d\u1eabn c\u1ea5u h\u00ecnh MySQL Master-Master Replication - Long V\u00e2n<\/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:\/\/longvan.net\/cong-dong\/huong-dan-cau-hinh-mysql-master-master-replication\/\" \/>\n<meta property=\"og:locale\" content=\"vi_VN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"H\u01b0\u1edbng d\u1eabn c\u1ea5u h\u00ecnh MySQL Master-Master Replication - Long V\u00e2n\" \/>\n<meta property=\"og:description\" content=\"I. Gi\u1edbi thi\u1ec7u gi\u1ea3i ph\u00e1p L\u01b0u \u00fd: thi\u1ebft l\u1eadp n\u00e0y mang l\u1ea1i m\u1ed9t s\u1ed1 v\u1ea5n \u0111\u1ec1 ti\u1ec1m \u1ea9n khi thay \u0111\u1ed5i d\u1eef li\u1ec7u \u0111ang x\u1ea3y ra tr\u00ean c\u1ea3 hai nodes. N\u00f3 c\u00f3 th\u1ec3 g\u1eb7p v\u1ea5n \u0111\u1ec1 n\u1ebfu c\u00f3 table&nbsp;v\u1edbi c\u00e1c tr\u01b0\u1eddng auto_increment. N\u1ebfu c\u1ea3 hai m\u00e1y ch\u1ee7 \u0111ang ch\u00e8n ho\u1eb7c c\u1eadp nh\u1eadt trong c\u00f9ng m\u1ed9t [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/longvan.net\/cong-dong\/huong-dan-cau-hinh-mysql-master-master-replication\/\" \/>\n<meta property=\"og:site_name\" content=\"Long V\u00e2n\" \/>\n<meta property=\"article:published_time\" content=\"2024-05-07T05:00:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-08-27T08:34:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/longvan.net\/cong-dong\/wp-content\/uploads\/2024\/05\/replication-model-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"402\" \/>\n\t<meta property=\"og:image:height\" content=\"299\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"V\u0169 Thi\u1ec7n Quang\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u0110\u01b0\u1ee3c vi\u1ebft b\u1edfi\" \/>\n\t<meta name=\"twitter:data1\" content=\"V\u0169 Thi\u1ec7n Quang\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 ph\u00fat\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/huong-dan-cau-hinh-mysql-master-master-replication\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/huong-dan-cau-hinh-mysql-master-master-replication\\\/\"},\"author\":{\"name\":\"V\u0169 Thi\u1ec7n Quang\",\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/#\\\/schema\\\/person\\\/d8575ab23f69ff6ff8fe27d082eb9f43\"},\"headline\":\"H\u01b0\u1edbng d\u1eabn c\u1ea5u h\u00ecnh MySQL Master-Master Replication\",\"datePublished\":\"2024-05-07T05:00:46+00:00\",\"dateModified\":\"2024-08-27T08:34:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/huong-dan-cau-hinh-mysql-master-master-replication\\\/\"},\"wordCount\":1224,\"publisher\":{\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/huong-dan-cau-hinh-mysql-master-master-replication\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/wp-content\\\/uploads\\\/2024\\\/05\\\/replication-model-1.png\",\"keywords\":[\"Linux\",\"master-master\",\"mysql\"],\"articleSection\":[\"Linux\"],\"inLanguage\":\"vi\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/huong-dan-cau-hinh-mysql-master-master-replication\\\/\",\"url\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/huong-dan-cau-hinh-mysql-master-master-replication\\\/\",\"name\":\"H\u01b0\u1edbng d\u1eabn c\u1ea5u h\u00ecnh MySQL Master-Master Replication - Long V\u00e2n\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/huong-dan-cau-hinh-mysql-master-master-replication\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/huong-dan-cau-hinh-mysql-master-master-replication\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/wp-content\\\/uploads\\\/2024\\\/05\\\/replication-model-1.png\",\"datePublished\":\"2024-05-07T05:00:46+00:00\",\"dateModified\":\"2024-08-27T08:34:33+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/huong-dan-cau-hinh-mysql-master-master-replication\\\/#breadcrumb\"},\"inLanguage\":\"vi\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/huong-dan-cau-hinh-mysql-master-master-replication\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"vi\",\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/huong-dan-cau-hinh-mysql-master-master-replication\\\/#primaryimage\",\"url\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/wp-content\\\/uploads\\\/2024\\\/05\\\/replication-model-1.png\",\"contentUrl\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/wp-content\\\/uploads\\\/2024\\\/05\\\/replication-model-1.png\",\"width\":402,\"height\":299},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/huong-dan-cau-hinh-mysql-master-master-replication\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Trang ch\u1ee7\",\"item\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"H\u01b0\u1edbng d\u1eabn c\u1ea5u h\u00ecnh MySQL Master-Master Replication\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/#website\",\"url\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/\",\"name\":\"Long V\u00e2n\",\"description\":\"C\u1ed9ng \u0110\u1ed3ng\",\"publisher\":{\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"vi\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/#organization\",\"name\":\"Long V\u00e2n\",\"url\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"vi\",\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/wp-content\\\/uploads\\\/2025\\\/11\\\/cropped-logo-longvancloudsolution.png\",\"contentUrl\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/wp-content\\\/uploads\\\/2025\\\/11\\\/cropped-logo-longvancloudsolution.png\",\"width\":1300,\"height\":330,\"caption\":\"Long V\u00e2n\"},\"image\":{\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/#\\\/schema\\\/person\\\/d8575ab23f69ff6ff8fe27d082eb9f43\",\"name\":\"V\u0169 Thi\u1ec7n Quang\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"vi\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ae494bee7d6ab274d4c5215c38c7a27e24822330d41ab77e89f2bfbeebe6ba5d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ae494bee7d6ab274d4c5215c38c7a27e24822330d41ab77e89f2bfbeebe6ba5d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ae494bee7d6ab274d4c5215c38c7a27e24822330d41ab77e89f2bfbeebe6ba5d?s=96&d=mm&r=g\",\"caption\":\"V\u0169 Thi\u1ec7n Quang\"},\"sameAs\":[\"http:\\\/\\\/longvan.net\"],\"url\":\"https:\\\/\\\/longvan.net\\\/cong-dong\\\/author\\\/thienquang\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"H\u01b0\u1edbng d\u1eabn c\u1ea5u h\u00ecnh MySQL Master-Master Replication - Long V\u00e2n","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:\/\/longvan.net\/cong-dong\/huong-dan-cau-hinh-mysql-master-master-replication\/","og_locale":"vi_VN","og_type":"article","og_title":"H\u01b0\u1edbng d\u1eabn c\u1ea5u h\u00ecnh MySQL Master-Master Replication - Long V\u00e2n","og_description":"I. Gi\u1edbi thi\u1ec7u gi\u1ea3i ph\u00e1p L\u01b0u \u00fd: thi\u1ebft l\u1eadp n\u00e0y mang l\u1ea1i m\u1ed9t s\u1ed1 v\u1ea5n \u0111\u1ec1 ti\u1ec1m \u1ea9n khi thay \u0111\u1ed5i d\u1eef li\u1ec7u \u0111ang x\u1ea3y ra tr\u00ean c\u1ea3 hai nodes. N\u00f3 c\u00f3 th\u1ec3 g\u1eb7p v\u1ea5n \u0111\u1ec1 n\u1ebfu c\u00f3 table&nbsp;v\u1edbi c\u00e1c tr\u01b0\u1eddng auto_increment. N\u1ebfu c\u1ea3 hai m\u00e1y ch\u1ee7 \u0111ang ch\u00e8n ho\u1eb7c c\u1eadp nh\u1eadt trong c\u00f9ng m\u1ed9t [&hellip;]","og_url":"https:\/\/longvan.net\/cong-dong\/huong-dan-cau-hinh-mysql-master-master-replication\/","og_site_name":"Long V\u00e2n","article_published_time":"2024-05-07T05:00:46+00:00","article_modified_time":"2024-08-27T08:34:33+00:00","og_image":[{"width":402,"height":299,"url":"https:\/\/longvan.net\/cong-dong\/wp-content\/uploads\/2024\/05\/replication-model-1.png","type":"image\/png"}],"author":"V\u0169 Thi\u1ec7n Quang","twitter_card":"summary_large_image","twitter_misc":{"\u0110\u01b0\u1ee3c vi\u1ebft b\u1edfi":"V\u0169 Thi\u1ec7n Quang","\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc":"11 ph\u00fat"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/longvan.net\/cong-dong\/huong-dan-cau-hinh-mysql-master-master-replication\/#article","isPartOf":{"@id":"https:\/\/longvan.net\/cong-dong\/huong-dan-cau-hinh-mysql-master-master-replication\/"},"author":{"name":"V\u0169 Thi\u1ec7n Quang","@id":"https:\/\/longvan.net\/cong-dong\/#\/schema\/person\/d8575ab23f69ff6ff8fe27d082eb9f43"},"headline":"H\u01b0\u1edbng d\u1eabn c\u1ea5u h\u00ecnh MySQL Master-Master Replication","datePublished":"2024-05-07T05:00:46+00:00","dateModified":"2024-08-27T08:34:33+00:00","mainEntityOfPage":{"@id":"https:\/\/longvan.net\/cong-dong\/huong-dan-cau-hinh-mysql-master-master-replication\/"},"wordCount":1224,"publisher":{"@id":"https:\/\/longvan.net\/cong-dong\/#organization"},"image":{"@id":"https:\/\/longvan.net\/cong-dong\/huong-dan-cau-hinh-mysql-master-master-replication\/#primaryimage"},"thumbnailUrl":"https:\/\/longvan.net\/cong-dong\/wp-content\/uploads\/2024\/05\/replication-model-1.png","keywords":["Linux","master-master","mysql"],"articleSection":["Linux"],"inLanguage":"vi"},{"@type":"WebPage","@id":"https:\/\/longvan.net\/cong-dong\/huong-dan-cau-hinh-mysql-master-master-replication\/","url":"https:\/\/longvan.net\/cong-dong\/huong-dan-cau-hinh-mysql-master-master-replication\/","name":"H\u01b0\u1edbng d\u1eabn c\u1ea5u h\u00ecnh MySQL Master-Master Replication - Long V\u00e2n","isPartOf":{"@id":"https:\/\/longvan.net\/cong-dong\/#website"},"primaryImageOfPage":{"@id":"https:\/\/longvan.net\/cong-dong\/huong-dan-cau-hinh-mysql-master-master-replication\/#primaryimage"},"image":{"@id":"https:\/\/longvan.net\/cong-dong\/huong-dan-cau-hinh-mysql-master-master-replication\/#primaryimage"},"thumbnailUrl":"https:\/\/longvan.net\/cong-dong\/wp-content\/uploads\/2024\/05\/replication-model-1.png","datePublished":"2024-05-07T05:00:46+00:00","dateModified":"2024-08-27T08:34:33+00:00","breadcrumb":{"@id":"https:\/\/longvan.net\/cong-dong\/huong-dan-cau-hinh-mysql-master-master-replication\/#breadcrumb"},"inLanguage":"vi","potentialAction":[{"@type":"ReadAction","target":["https:\/\/longvan.net\/cong-dong\/huong-dan-cau-hinh-mysql-master-master-replication\/"]}]},{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/longvan.net\/cong-dong\/huong-dan-cau-hinh-mysql-master-master-replication\/#primaryimage","url":"https:\/\/longvan.net\/cong-dong\/wp-content\/uploads\/2024\/05\/replication-model-1.png","contentUrl":"https:\/\/longvan.net\/cong-dong\/wp-content\/uploads\/2024\/05\/replication-model-1.png","width":402,"height":299},{"@type":"BreadcrumbList","@id":"https:\/\/longvan.net\/cong-dong\/huong-dan-cau-hinh-mysql-master-master-replication\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Trang ch\u1ee7","item":"https:\/\/longvan.net\/cong-dong\/"},{"@type":"ListItem","position":2,"name":"H\u01b0\u1edbng d\u1eabn c\u1ea5u h\u00ecnh MySQL Master-Master Replication"}]},{"@type":"WebSite","@id":"https:\/\/longvan.net\/cong-dong\/#website","url":"https:\/\/longvan.net\/cong-dong\/","name":"Long V\u00e2n","description":"C\u1ed9ng \u0110\u1ed3ng","publisher":{"@id":"https:\/\/longvan.net\/cong-dong\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/longvan.net\/cong-dong\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"vi"},{"@type":"Organization","@id":"https:\/\/longvan.net\/cong-dong\/#organization","name":"Long V\u00e2n","url":"https:\/\/longvan.net\/cong-dong\/","logo":{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/longvan.net\/cong-dong\/#\/schema\/logo\/image\/","url":"https:\/\/longvan.net\/cong-dong\/wp-content\/uploads\/2025\/11\/cropped-logo-longvancloudsolution.png","contentUrl":"https:\/\/longvan.net\/cong-dong\/wp-content\/uploads\/2025\/11\/cropped-logo-longvancloudsolution.png","width":1300,"height":330,"caption":"Long V\u00e2n"},"image":{"@id":"https:\/\/longvan.net\/cong-dong\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/longvan.net\/cong-dong\/#\/schema\/person\/d8575ab23f69ff6ff8fe27d082eb9f43","name":"V\u0169 Thi\u1ec7n Quang","image":{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/secure.gravatar.com\/avatar\/ae494bee7d6ab274d4c5215c38c7a27e24822330d41ab77e89f2bfbeebe6ba5d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ae494bee7d6ab274d4c5215c38c7a27e24822330d41ab77e89f2bfbeebe6ba5d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ae494bee7d6ab274d4c5215c38c7a27e24822330d41ab77e89f2bfbeebe6ba5d?s=96&d=mm&r=g","caption":"V\u0169 Thi\u1ec7n Quang"},"sameAs":["http:\/\/longvan.net"],"url":"https:\/\/longvan.net\/cong-dong\/author\/thienquang\/"}]}},"_links":{"self":[{"href":"https:\/\/longvan.net\/cong-dong\/wp-json\/wp\/v2\/posts\/4864","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/longvan.net\/cong-dong\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/longvan.net\/cong-dong\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/longvan.net\/cong-dong\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/longvan.net\/cong-dong\/wp-json\/wp\/v2\/comments?post=4864"}],"version-history":[{"count":124,"href":"https:\/\/longvan.net\/cong-dong\/wp-json\/wp\/v2\/posts\/4864\/revisions"}],"predecessor-version":[{"id":6285,"href":"https:\/\/longvan.net\/cong-dong\/wp-json\/wp\/v2\/posts\/4864\/revisions\/6285"}],"wp:attachment":[{"href":"https:\/\/longvan.net\/cong-dong\/wp-json\/wp\/v2\/media?parent=4864"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/longvan.net\/cong-dong\/wp-json\/wp\/v2\/categories?post=4864"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/longvan.net\/cong-dong\/wp-json\/wp\/v2\/tags?post=4864"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}