MySQL Replication

GRANT REPLICATION SLAVE ON *.* TO 'user-xxx'@'172.10.10.11' IDENTIFIED BY 'xxxxx';
flush privileges;
show master status\G;


change master to master_host='172.10.10.100',  master_user='user-xxx',  master_password='xxxxxx', master_log_file='mysql-bin.001037', master_log_pos=1406240;
flush privileges;

(master_log_file和master_log_pos)的值你可以在服务器上运行 show master status; 来得到。

start slave;
stop slave;
show slave status\G

 

 

ERROR 1200 (HY000): The server is not configured as slave; fix in config file or with CHANGE MASTER TO

解决:

1、看看server-id

2、重新授权配置 slave 从节点。。。

posted @ 2020-12-03 10:32  walkersss  阅读(97)  评论(0编辑  收藏  举报