mysql 主从复制(主主复制)

给从开账号

grant replication slave,reload,super on *.*  to [email protected] identified by 'a123456';


从改变

CHANGE MASTER TO MASTER_HOST='172.16.1.202', MASTER_USER='yang216', MASTER_PASSWORD='a123456', MASTER_LOG_FILE='mysql-bin-tocoding.000003',MASTER_LOG_POS=154;


不同步的原因

mysql> SET SESSION binlog_format = 'STATEMENT';
mysql> SET SESSION binlog_format = 'ROW';
mysql> SET SESSION binlog_format = 'MIXED';
mysql> SET GLOBAL binlog_format = 'STATEMENT';
mysql> SET GLOBAL binlog_format = 'ROW';
mysql> SET GLOBAL binlog_format = 'MIXED';

猜你喜欢

转载自blog.csdn.net/JqueryTomcat/article/details/78971970