配置master用户及权限
1 2 3 4 5 |
grant replication slave,replication client on *.* to rep@'172.19.17.%' identified by 'rep'; grant all on test.* to rep@'172.19.17.%'; commit; |
配置slaver用户及权限
1 2 3 4 5 6 7 8 9 |
grant replication slave,replication client on *.* to rep@'172.19.17.%' identified by 'rep'; grant all on test.* to rep@'172.19.17.%'; commit; change master to master_host='172.19.17.210', master_user='rep',master_password='rep',master_log_file='mysql-bin.000001',master_log_pos=0; start slave; |