Environment: Centos 6.5
mysql5.6
The virtual machine environment is used
Master ip:192.168.17.140
Slaver ip:192.168.17.141
Start configuration below:
Configuration of Master:
1. Note the arrows:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/43/6B/wKiom1PaV-DCeGo3AAHwX5yo73E802.jpg "title=" 1.jpg " alt= "Wkiom1pav-dcego3aahwx5yo73e802.jpg"/>
2: Restart the MySQL service
Shell:service mysqld Restart
3. See:
The command is as follows:
Mysql-u root-p
Grant replication Slave,replication Client on * * to ' root ' @ ' 192.168.17.141 '
Identified by ' happy123 ';
Show Master Status \g
-------------------------------Gorgeous split-line--------------------------
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/43/6B/wKioL1PaWaWR0mbVAALEWfDrT8I926.jpg "title=" 2.jpg " alt= "Wkiol1pawawr0mbvaalewfdrt8i926.jpg"/>
Slaver configuration:
See:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/43/6B/wKioL1PaWqrxW7W3AAHY1nGCwLU772.jpg "title=" 3.jpg " alt= "Wkiol1pawqrxw7w3aahy1ngcwlu772.jpg"/>
2. Restart the server, go to the client, and execute the following command:
Just note that the following log is consistent with the above master view
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/43/6B/wKiom1PaWdSBu68HAAD-TAlrU4A688.jpg "title=" 4.jpg " alt= "Wkiom1pawdsbu68haad-talru4a688.jpg"/>
3. View slave situation
show slave status \g;
The following situation occurs because my slave is cloned, so the UUID in the auto.cnf file in the MySQL data directory is the same as
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/43/6B/wKiom1PaWmOSyKjHAAGcmbEalAM310.jpg "title=" 5.jpg " alt= "Wkiom1pawmosykjhaagcmbealam310.jpg"/>
And then we can do this:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/43/6B/wKioL1PaXAqzUX-5AAKIsu0PIYg518.jpg "title=" 6.jpg " alt= "Wkiol1paxaqzux-5aakisu0piyg518.jpg"/>
Again start slave, the following page appears: Indicates that the configuration was successful:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/43/6B/wKiom1PaW07g-nwHAAIhBED4vkQ025.jpg "title=" 7.jpg " alt= "Wkiom1paw07g-nwhaaihbed4vkq025.jpg"/>
I have carried out the test myself, can be achieved.
The final summary: errors to see the above log, it is clear that you can find out what the problem.
This article from "Little Just Blog" blog, declined reprint!