赞
踩
- # binlog日志
- server-id=101
- log-bin = /home/dev/dev-install/mysql-5.7.40/binlog/mysql-bin
./mysql.server restart
GRANT REPLICATION SLAVE ON *.* to 'syncdata'@'%' identified by 'Sync@Data123';
show master status;
server-id=102
./mysql.server restart
- change master to master_host='192.168.xxx.xxx',master_user='syncdata',master_password='Sync@Data123',master_log_file='mysql-bin.000009',master_log_pos=433;
-
-
- start slave;
show slave status \G
找到从数据库的该文件对应的 UUID,该文件为/home/dev/dev-install/mysql-5.7.40/data/auto.cnf,然后编辑auto.cnf,将里面uuid的值随便改一个即可,然后保存文件
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。