set --server-id to enable either a master or a slave

set --server-id to enable either a master or a slave


Below issue can be faced, when we run CHANGE MASTER command to setup replication.
mysql> change master to master_host='xx.xx.xx.xx',master_user='rep_user',master_password="xxxxxxx", master_log_file='db-01-test-bin.000064',master_log_pos=95854072,master_auto_position=0;
ERROR 1794 (HY000): 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.

Solution :-

Here It is assumed, We have already set server-id parameter value different on master and slave node but still, we have the above error.

It happens once, you performed the server packages upgrade(like from 5.6 to 5.7) and just started MySQL service and going to run CHANGE MASTER command.

So, to solve this issue, Run mysql_upgrade command to update/upgrade system tables and then restart MySQL service.
mysql_upgrade 

service mysql restart

Comments

Popular

SLEEP thread causing "Waiting for table metadata lock"

ERROR 1040 (HY000): Too many connections

errno: 24 - Too many open files

How to Prepare for MySQL Certification Exam

How to properly shutdown MySQL before any maintenance activity

How to create CentOS VM using Vagrant

Quickly configure replication using DBdeployer [SandBox]

MySQL 8.0 : Error Logging