How to build mysql master-slave server on centos7 (graphic tutorial)
This article mainly introduces the establishment of the master-slave server of mysql on centos. If you haven't built it, you can check my previous blog, which contains detailed instructions for installing centos and installing mysql on centos.
1. Install from virtual machine:
1. Right click—>Manage—>Clone
2. Select full clone
3. Modify the location of the virtual machine, the default is C Under the plate.
4. When the cloning is complete After that, there are two virtual machines like this. Since the ips of the two cloned servers are the same, you need to modify the ip of the slave service virtual machine;
5. Modify the configuration of the slave service virtual machine and open the configuration file
If you don’t know which configuration file is, you can find it as follows,
6. Find the red line below and modify the ip address. I will change 150 to 151 here:
7. After the modification is completed, restart
8. Use xShell to connect to the newly configured virtual machine
Two. Configure mysql main service:
No matter which project, 80% are read Mainly. Therefore, the configuration of the slave library is generally required to be higher than that of the master library.
For the configuration of the main library, it is mainly to turn on the binlog log.
1. Enter mysql to view the status:
You can see that the execution result is empty, so you need to turn on the binlog log;
2. Find the mysql configuration file:
This article is published by www.internetweblist.com and does not represent the position of www.internetweblist.com/：http://www.internetweblist.com/programming/82410.html