<span style= "FONT-SIZE:18PX;" > Simple Steps Summary-FAST implementation: first: The configuration of the master server step: 2: Give the authorized user from the server grant all on the *. * to [email protected] identified by "pass123"; (all means all permissions, authorized all users, about the database all the tables (only this server 192.168.10.2, if the host is a string single quotation mark extension ' LEYANGJUNPC '): The account is User1 password is pass123) GRANT REPLICATION SLAVE, REPLICATION CLIENT on * * to [email protected] ' 192.168.0.% ' identified by ' P4ssword '; 3: Repair Change the configuration file of the primary database server My.cnf/ini, open the Bin-log log, and set the value of Server-id log-bin=mysql-binserver-id=1 (master and slave Server-id must be guaranteed unique, not the same)-- One master and more from the same two: configuration steps from the server: 1: Config file: Modify the Server-id of the database, note that the value of Server-id must be unique, cannot be the same as the primary data configuration, and if there are multiple slave servers, each slave server must have its own unique Server-id value Turn on the Bin-log2:mysql version from 5.1.7 does not support the "master-host" parameter similar to the following command from the library: change Master to master_host= ' Masterip ', master_user= ' Slave ', master_password= ' slvaepass '; slave start; Restart 3: After configuration, check whether and master server synchronization method (data synchronization success is not successful See *): Show slave status\g See: * Salve_io_running:yes (indicates that the Bin-log log of the master server has been successfully taken back and synchronized, write a line I will synchronize one line) * Salve_sql_running:yes (brought over the Bin-log log and successfully executed the SQL statement, One master data)--see the instructions for Yes have been synchronized with the master server Master_log_file:mysql-bin.00002 (sync over bin-log log) read_master_log_pos:106 (location, show master status Master to see) Connect_r Etry:60 (go back to master server Sync Bin-log log every 60 seconds) trace log: relay-log_file:localhost-relay-bin.00004 (log file generated from server, not mysq L-BIN.XXX) data synchronization, we query the data can go from the server to query without going to the main server, reduce the load after you can play your master-slave copy, pay attention to do not delete data from the server, oh, to be able to master-slave synchronization will have problems, enough you play the </span >
MySQL master-slave copy in detail (ii) FAST implementation