一.master 上操作: 主庫建立同步的賬戶rep并且授權replication;在主庫鎖表flush tables with read lock; 并查看主庫上binlog文件及位置點 show master statusG;記錄下此binlog文件和位置點。 mysql -uroot -p'Xp#&Xwe3Gf0x' -e "grant replication slave on *.* to rep@'192.168.1.200' identified by 'JuwoSweTbUser'; flush privileges;flush tables with read lock; show master status;"