在Centos上搭建Mysql从服务器配置时报错

以下是错误信息


Slave is not configured or failed to initialize properly. You must at least set –server-id to enable either a master or a slave. Additional error messages can be found in the MySQL error log.

错误原因

在从数据库my.cnf配置文件里没有配置server-id属性

解决办法

//在my.cnf里添加一行
server-id=134 //这里的id只要跟主数据库id不一样就行

猜你喜欢

转载自blog.csdn.net/qq_38790872/article/details/81045160