You must at least set --server-id

mysql> change master to
-> master_host='192.168.1.22',
-> master_user='repl',
-> master_password='repl',
-> master_auto_position=1;
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.

但是我的备库server-id已配置
mysql> show variables like '%server%';
+---------------------------------+--------------------------------------+
| Variable_name | Value |
+---------------------------------+--------------------------------------+
| character_set_server | utf8 |
| collation_server | utf8_general_ci |
| innodb_ft_server_stopword_table | |
| server_id | 30 |
| server_id_bits | 32 |
| server_uuid | 86b0d52d-59b4-11e6-9bcf-000c2986c229 |
+---------------------------------+--------------------------------------+

more /etc/my.cnf

[mysqld]
datadir=/usr/local/mysql/data
socket=/tmp/mysql.sock
server-id=30

主库的/ect/my.cnf
[mysqld]
server-id=1

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐