环境说明
Mysql:mysql-5.7.28-linux (安装目录 /usr/local/mysql)
OS:centos7
数据库规化
master同步账号创建
create user 'syc_usr'@'%' identified by 'root1234';
grant replication slave on *.* to 'syc_usr'@'%';
flush privileges;
获取master状态
show master status;
停止slave
设置slave的maser信息
reset slave all;
CHANGE MASTER TO
master_host = 'myServer',
master_port =3307,
master_user = 'syc_usr',
master_password = 'root1234',
master_log_file = 'mysql-bin.000014',
master_log_pos =823 ;
start slave;
查看salve同步Thread起来没有
show slave status\G;
验证
来源:oschina
链接:https://my.oschina.net/u/4379065/blog/4360139