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 t
经分析,需要:
删除5张表,并重新导入脚本
use mysql
drop table slave_master_info;
drop table slave_relay_log_info;
drop table slave_worker_info;
drop table innodb_index_stats;
drop table innodb_table_stats;
(2)重新启动数据库
注:这一步是必须的,否则无法正常配置双主架构。
systemctl restart mysqld
mysql -p
CHANGE MASTER TO
MASTER_HOST='192.158.121.16',
MASTER_USER='root',
MASTER_PASSWORD='123456',
MASTER_LOG_FILE='mysql-bin.000002',
MASTER_LOG_POS=154,
master_port=3306;