本文主要是介绍[ERROR] You have enabled the binary log, but you haven't provided the mandatory server-id.,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
MySQL在开启bin-log时报错,信息如下:
[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-09-03T03:17:51.815890Z 0 [ERROR] Aborting
MySQL版本
mysql> select version();
+------------+
| version() |
+------------+
| 5.7.14-log |
+------------+
1 row in set (0.00 sec)
报错的原因:
在设置bin log日志的时候,没有设置server_id参数。server-id参数用于在复制中,为主库和备库提供一个独立的ID,以区分主库和备库;开启二进制文件的时候,需要设置这个参数。
解决方法:
[root@mysql bin]# vi /etc/my.cnf
#add
[mysqld]
log-bin=mysql-bin
server-id=1
- 重新启动MySQL服务,问题解决。
转自:https://blog.csdn.net/DBDoctor/article/details/52422637?utm_source=blogxgwz2
这篇关于[ERROR] You have enabled the binary log, but you haven't provided the mandatory server-id.的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!