In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
In this issue, the editor will bring you more information about how to understand MySQL replication technology. The article is rich in content and analyzed and described from a professional point of view. I hope you can get something after reading this article.
One of the MySQL replication technologies: master and multi-slave
The method of cloning slave described below is a practical method; the process of cold backing up a slave and then restoring it to another server
a. Cold backup and recovery slave
Mysql > show slave status\ G
(root@localhost) [testdb] > show slave status\ G
* * 1. Row *
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.12.181
Master_User: repuser
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: vm1-bin.000014
Read_Master_Log_Pos: 1723
Relay_Log_File: vm2-slave-bin.000023
Relay_Log_Pos: 932
Relay_Master_Log_File: vm1-bin.000014
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Remember Master_Log_File and pos, and then close slave
# service stop mysql
Then the relevant files of the tar or cp,scp slave library are sent to the target server
b. Configure slave
1. Configuration of parameters in my.cnf
Relay-log=/data/mysql/log3/vm3-slave-bin.log
Server-id = 3
The relay-log-index option is the relay log index file, and the relay-log option is the relay log file name.
two。 Restart the service so that the parameters take effect.
c. Connect master
-- reset slave
Mysql > reset slave
-- change master
Mysql > change master to
Master_host = '192.168.12.181'
Master_port = 3306
Master_user = 'repuser'
Master_password = 'aa12AA,.'
Master_log_file = 'vm1-bin.000014'
Master_log_pos = 1723
-- start replication
Mysql > start slave
-- View the status of replication
Mysql > show slave status\ G
The above is the editor for you to share how to understand MySQL replication technology in one master and multiple followers, if you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.