We know that the overhead of MySQL Reading and Writing Performance is quite different. Generally, the server is under 20% write pressure, and the other 80% pressure comes from reading. Of course, this depends on the actual industry.
We know that the overhead of MySQL Reading and Writing Performance is quite different. Generally, the server is under 20% write pressure, and the other 80% pressure comes from reading. Of course, this depends on the actual industry.
We know that the overhead of MySQL Reading and Writing Performance is quite different. Generally, the server is under 20% write pressure, and the other 80% pressure comes from reading, of course, this depends on the actual business situation.
In this article, we are going to configure one master, three slaves. In fact, one master, multiple slaves are actually an extension of one master and one slave, because there is no communication between slave databases, which method is used to view the bandwidth load and traffic.
The principle of MySQL Master-Slave replication is that the Master constantly writes binary logs, Slave reads logs, and executes them according to the SQL records! For example:
Load Nginx in Ubuntu for high-performance WEB Server 5 --- MySQL master/Master Synchronization
Production Environment MySQL master/Master synchronization primary key conflict handling
MySQL Master/Slave failure error Got fatal error 1236
MySQL master-slave replication, implemented on a single server
Build a MySQL proxy server for read/write splitting + Master/Slave Synchronization
MySQL 5.5 master-slave bidirectional Synchronization
MySQL 5.5 master-slave synchronization troubleshooting
MySQL master-slave replication asynchronous semi-sync instance
The master-slave configuration of MySQL is inherent. You only need to perform simple configuration. Well, let's talk about it. Let's get started!
My environment is like this. All four machines on Vmware use bridging and dhcp is used to directly obtain Dynamic IP addresses.
Master: 192.168.83.61
Slave1: 192.168.83.87
Slave2: 192.168.83.88
Slave3: 192.168.83.89
MySQL versions on all four machines are MySQL 5.5.40
First, configure the Master
Vi/etc/my. cnf
Server-id = 61
Log-bin = mysql-bin
Binlog-do-db = test // database to be synchronized
Binlog-ignore-db = mysql // ignored Database
Binlog-ignore-db = information-schema // ignored Database
Add a synchronization account for the three slave instances on the master node.
Mysql> grant replication slave1 on *. * to 'slave1 '@ '192. 168.83.87' identified by 'slave1 ';
// Log on to slave1
Mysql> grant replication slave on *. * to 'slave2' @ '192. 168.83.88 'identified by 'slave2 ';
// Log on to slave2
Mysql> grant replication slave on *. * to 'slave3 '@ '192. 168.83.89' identified by 'slave3 ';// Log on to slave3 successfully
Save and restart the Mysql service.
Service mysqld restart
Then, in mysql command line mode, use
Mysql> show master status \ G;
* *************************** 1. row ***************************
File: mysql-bin.000001
Position: 106
Binlog_Do_DB: test
Binlog_Ignore_DB: mysql, information-schema
1 row in set (0.00 sec)
For more details, please continue to read the highlights on the next page: