[ERROR] --gtid-mode=ON or UPGRADE_STEP_1 or UPGRADE_STEP_2 requires --log-bin and --log-slave-updates

centos7.5 做基于GTID的主从重启从库报错

问题:

[root@db01-51 ~]# tail -50 /application/mysql/data/db01-51.err
2019-04-01 15:33:16 31069 [ERROR] --gtid-mode=ON or UPGRADE_STEP_1 or UPGRADE_STEP_2 requires --log-bin and --log-slave-updates

解决方法:

[root@db01-51 ~]# vim /etc/my.cnf
[mysqld]
autocommit=0
log-bin=mysql-bin
binlog_format=row
gtid_mode=ON
enforce_gtid_consistency
log-slave-updates  #加上这一条,让从库都更新binlog
[root@db01-51 ~]# /etc/init.d/mysqld restart
 ERROR! MySQL server PID file could not be found!
Starting MySQL. SUCCESS!

猜你喜欢

转载自www.cnblogs.com/lvhanzhi/p/10638576.html