Connect to a source code installation mysql5.6.
The master and slave servers are installed with msyql5.6
Logbin logs are turned on both the primary and slave servers.
The master and slave servers are Server-id, and the ServerID number is different.
Primary server Configuration Sync account
Grant Replication Slave on * * to ' repl ' @ ' 192.168.4.31 ' identified by ' repl ';
Flush privileges;
Show master status; View the primary server binary file information.
You can start synchronization from the first line of the first binary log. You can also stop the primary server from writing, use mysqldump to import from the server, and synchronize from the binary location of the record.
From the server configuration to which primary server, what account synchronization, synchronization content from the binary document start.
Change MASTER to master_host= ' 192.168.4.50 ', master_user= ' repl ', master_password= ' repl ', master_log_file= ' Mysql-bin.000001 ', master_log_pos=0;
start slave; boot from service. When the boot succeeds, it is logged in the data file from the server-related configuration.
show slave status; View synchronization from service. After synchronization is complete, set prohibit write to slave server.
This article is from the "Elder Don" blog, please be sure to keep this source http://zhanglaotang.blog.51cto.com/3196967/1543005