MySQL日志报错'haven't provided the mandatory server-id'

2018/12 27 04:12
启动MySQL报错,日志文件中的错误如下:
2016-03-19T09:30:20.325988Z 0 [ERROR] You have enabled the binary log, but you haven't provided the mandatory server-id. Please refer to the proper server start-up parameters documentation
2016-03-19T09:30:20.326024Z 0 [ERROR] Aborting
2016-03-19T09:30:20.326035Z 0 [Note] Binlog end

报错的原因:
在设置bin log日志的时候,没有设置server_id参数。
server-id参数用于在复制中,为主库和备库提供一个独立的ID,以区分主库和备库;开启二进制文件的时候,需要设置这个参数。

解决方法:
[root@T400-kelong log]# vim /etc/my.cnf
#bin log
server_id=100
log-bin=/log/product-bin

--转载请注明: http://91o.cc/mysql%e6%97%a5%e5%bf%97%e6%8a%a5%e9%94%99havent-provided-the-mandatory-server-id/

发表回复

(必填)