启动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
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26506993/viewspace-2060130/
,如需转载,请注明出处,否则将追究法律责任。