一.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;"