Slave_IO_Running: No一直是NO状态,更换了uuid都不行

来源:4-5 MySQL复制实战

qq_醉生梦死_16

2020-07-21

**************** 1. row ***************************
Slave_IO_State:
Master_Host: 122.114.162.33
Master_User: im_repl
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000005
Read_Master_Log_Pos: 154
Relay_Log_File: ebs-46577-relay-bin.000010
Relay_Log_Pos: 4
Relay_Master_Log_File: mysql-bin.000005
Slave_IO_Running: No
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 154
Relay_Log_Space: 154
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 1593
Last_IO_Error: Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it).
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 1
Master_UUID:
Master_Info_File: /home/server/data/master.info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp: 200721 21:52:16
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set:
Executed_Gtid_Set:
Auto_Position: 0
Replicate_Rewrite_DB:
Channel_Name:
Master_TLS_Version:
1 row in set (0.00 sec)

写回答

5回答

qq_醉生梦死_16

提问者

2020-07-22

5.7版本的,现在又出现了新的错误

Slave_SQL_Running: No

Last_Error: Error 'Operation CREATE USER failed for 'im_repl'@'%'' on query. Default database: ''. Query: 'CREATE USER 'im_repl'@'%' IDENTIFIED WITH 'mysql_native_password' AS '*6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9''


0
0

qq_醉生梦死_16

提问者

2020-07-22

提示这个错误,database: ''. Query: 'CREATE USER 'im_repl'@'%' IDENTIFIED WITH 'mysql_native_password' AS '*6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9'

0
0

qq_醉生梦死_16

提问者

2020-07-22

知道原因了

0
0

qq_醉生梦死_16

提问者

2020-07-22

重新设置了以后,

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'replication_rewrite_db=((imooc_db,order_db))' at line 1


0
1
sqlercn
你用的什么版本的MySQL?
2020-07-22
共1条回复

sqlercn

2020-07-22

看错误是因为集群中的服务器使用的是相同的server_id

0
0

MyCAT+MySQL搭建高可用企业级数据库集群

国内顶级DBA亲授,精讲企业级MyCAT应用

816 学习 · 223 问题

查看课程