环境:centos7 mysql8
从库配置如下:
bin_log=/var/lib/mysql/binlog
server_id = 200
#ENFORCE_GTID_CONSISTENCY = ON
gtid_mode = on
enforce-gtid-cnsistency = on
read_only = on
master_info_repository = TABLE
relay_log_info_repository = TABLE
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
从库报错信息如下:
[root@bogon ~]# systemctl status mysqld.service
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2018-12-10 11:03:33 CST; 9s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 3155 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS (code=exited, status=1/FAILURE)
Process: 3134 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 3155 (code=exited, status=1/FAILURE)
Status: “SERVER_BOOTING”
Dec 10 11:03:24 bogon systemd[1]: Starting MySQL Server…
Dec 10 11:03:33 bogon systemd[1]: mysqld.service: main process exit…E
Dec 10 11:03:33 bogon systemd[1]: Failed to start MySQL Server.
Dec 10 11:03:33 bogon systemd[1]: Unit mysqld.service entered faile…
Dec 10 11:03:33 bogon systemd[1]: mysqld.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
mysqld.log日志信息:
2018-12-10T03:03:28.114480Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.13) starting as process 3155
2018-12-10T03:03:32.006960Z 1 [Warning] [MY-010005] [Server] Skip re-populating collations and character sets tables in read-only mode.
2018-12-10T03:03:32.171239Z 0 [ERROR] [MY-010912] [Server] GTID_MODE = ON requires ENFORCE_GTID_CONSISTENCY = ON.
2018-12-10T03:03:32.171298Z 0 [ERROR] [MY-010119] [Server] Aborting
2018-12-10T03:03:33.727341Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.13) MySQL Community Server - GPL.
请老师帮忙,实在找不到问题所在了,十分谢谢!