Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Case Analysis of mysql Master-Slave replication Strategy

2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

Today, the editor will share with you the relevant knowledge points of mysql master-slave replication strategy instance analysis. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article. Let's take a look.

Description

1. Full synchronization. When master requests service, wait for slave to synchronize before responding to client.

2. Semi-synchronization. When master requests service, only any slave synchronization is needed.

3. Asynchronous, master synchronous, no matter the state of slave, use the default state.

Example

(1) View server1's uuid [root@server1 mysql] # cat / var/lib/mysql/ auto.cnf [auto] server-uuid=db6e25ff-b049-11e9-84f5-525400ca9499 (2) delete previous data in server1 and server2 Ensure data consistency [root@server1 ~] # systemctl stop mysqld [root@server1 ~] # cd / var/lib/mysql [root@server1 mysql] # lsauto.cnf ibdata1 mysql-bin.000002 private_key.pemca-key.pem ib_logfile0 mysql-bin.000003 public_key.pemca.pem ib_logfile1 mysql-bin.index server-cert.pemclient-cert.pem ibtmp1 | mysql.sock server-key.pemclient-key.pem mysql mysql.sock.lock sysib_buffer_pool mysql-bin.000001 performance_schema westos [root@server1 mysql] # rm-fr * [root@server1 ~] # systemctl start mysqld (3) server3 installs mysql (4) server1 server2 sever3 performs security initialization and login to cat / var/log/mysqld.log | above grep password mysql_secure_installation is the "mysql master-slave replication policy | A brief example Analysis of all the contents of this article Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to 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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report