mysql-5.7.22 master-slave synchronization (read-write separation) configuration scheme

MySQL master-slave configuration.

1. To solve the performance bottleneck of the web application system and database, the database cluster is used to realize the query load;
2. MySQL supports the master-slave replication function of the database, using the master database to write data, and the slave database to perform data read operation

1. Environment introduction and explanation

1. The operating system where the main library is located: windows server 2012 (64-bit);

Version of the main library: mysql-5.7.22-winx64.zip;

The ip address of the main library: 127.0.0.1;

The port of the main library: 3307;

2. The operating system where the slave library 1 is located: windows server 2012 (64-bit);

Version from library 1: mysql-5.7.22-winx64.zip;

The ip address of slave library 1: 127.0.0.1;

port from library 1: 3308;

3. The operating system where the slave library 2 is located: windows server 2012 (64-bit);

Version from library 2: mysql-5.7.22-winx64.zip;

The ip address of slave library 2: 127.0.0.1;

port from library 2: 3309;

Note: The version of the main library and the slave library can be consistent or inconsistent. It should be noted that if the two versions are inconsistent, the version of the main library generally needs to be lower than the version of the slave library, so that some sql cannot be executed due to version problems. question.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325558881&siteId=291194637