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

Master-Slave replication of MYSQL5.7 based on SSL

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The mysql version of this document is 5.7.22 and the Linux kernel is 3.10.0-862.el7.x86_64.

First of all, the principle of master-slave replication:

1. The binary log (binary) of the master server records the added or deleted SQL statements entered by the user through the binary log, and notifies the storage engine to commit the transaction.

2. Slave copies the binary log of master to its own relay log. First, the slave starts a worker thread (the Icano thread), which opens a connection in master, and then starts Binlog dump process. Binlog dump process reads events from master's binary log, and if it is already synchronized with master, it hibernates waiting for new events to occur. The iThread O thread then writes the s events read by Binlog dump process to the relay log.

3. The slave thread reads events from the relay log and replays them to keep SQL and SQL consistent.

Second, in the process of master-slave replication, clear text is used to transmit data, so there is a hidden danger that illegal users grab data from the intermediate package. Master-slave replication based on SSL can eliminate this hidden trouble and ensure a certain degree of security.

Install mysql

Master-slave replication configuration

Master

Slave

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

Database

Wechat

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

12
Report