Bug #83749 ERROR 1794 (HY000): Slave is not configured or failed to initialize properly
Submitted: 8 Nov 2016 21:32 Modified: 7 Dec 2016 3:29
Reporter: Harman Randhawa Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.7.10 and onwards OS:Linux
Assigned to: CPU Architecture:Any
Tags: replication

[8 Nov 2016 21:32] Harman Randhawa
Description:
If relay_log_info_repository is set as file in my.cnf and slave_master_info, slave_relay_log_info and slave_worker_info tables are populated in mysql schema, MySQL doesn't show the result of show slave status. If you run reset slave, an error is returned:

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. 

How to repeat:
Try restoring a dump from server where relay_log_info_repository is set as table. This populates slave_relay_log_info and slave_worker_info tables on target instance and upon restart of MySQL service you get this error. 

Suggested fix:
Truncate slave_relay_log_info and slave_worker_info tables in MySQL schema and restart MySQL service or set relay_log_info_repository as table instead of a file as  work around.

Suggested fix is to ignore information in  slave_master_info, slave_relay_log_info and slave_worker_info tables and not to return an error while resetting teh slave when relay_log_info_repository is set as file.
[10 Nov 2016 20:14] Harman Randhawa
Error occurs after MySQL service restart.
[1 Dec 2016 15:50] Harman Randhawa
MySQL should ignore information in 3 tables in MySQL schema i.e. in slave_master_info, slave_relay_log_info and slave_worker_info, if relay_log is set as file as oppose to a table, instead of returning an error message.
[7 Dec 2016 3:29] MySQL Verification Team
Thanks for your submission, 

verified as described

kind regards