mysql同步Last_IO_Errno: 2061
10.100.19.214 主库1
10.100.19.215 主库1
10.100.19.216 从库
mysql> show slave status FOR CHANNEL 'testdb214'G;
*************************** 1. row ***************************
Slave_IO_State: Connecting to master
Master_Host: 10.100.19.214
Master_User: repluser
Master_Port: 3306
Connect_Retry: 60
Master_Log_File:
Read_Master_Log_Pos: 4
Relay_Log_File: relay-log-testdb214.000001
Relay_Log_Pos: 4
Relay_Master_Log_File:
Slave_IO_Running: Connecting
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table: test.%
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 0
Relay_Log_Space: 156
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: 0
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 2061
Last_IO_Error: error connecting to master 'repluser@10.100.19.214:3306' - retry-time: 60 retries: 1 message: Authentication plugin 'caching_sha2_password' reported error: Authentication requires secure connection.
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 0
Master_UUID:
Master_Info_File: mysql.slave_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: 210203 10:43:31
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set:
Executed_Gtid_Set: 7b68143a-645e-11eb-b60f-fa163ea9cdf0:1-32
Auto_Position: 1
Replicate_Rewrite_DB:
Channel_Name: testdb214
Master_TLS_Version:
Master_public_key_path:
Get_master_public_key: 0
Network_Namespace:
1 row in set, 1 warning (0.01 sec)
ERROR:
No query specified
mysql>
# 解决办法
mysql> select user,host,plugin,authentication_string,password_expired from mysql.user where user='mysqlsync';
+-----------+------+-----------------------+-------------------------------------------+------------------+
| user | host | plugin | authentication_string | password_expired |
+-----------+------+-----------------------+-------------------------------------------+------------------+
| mysqlsync | 10.% | mysql_native_password | *8A212EAD2546C1DB779E106E446D7C75D0ADD858 | N |
+-----------+------+-----------------------+-------------------------------------------+------------------+
1 row in set (0.00 sec)
set sql_log_bin=0;
drop user 'mysqlsync'@'10.%';
create user 'mysqlsync'@'10.%' IDENTIFIED BY 'mysqlsyncpwd';
GRANT REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO `mysqlsync`@`10.%`;
FLUSH PRIVILEGES;
set sql_log_bin=1;