Bug #96150 'show salve status' show the Inaccurate Last_IO_Error message

Submitted: 10 Jul 2019 8:15 Modified: 10 Jul 2019 11:34
Reporter: songlei wang Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:8.0.16 OS:CentOS
Assigned to: CPU Architecture:Any
Tags: replication

[10 Jul 2019 8:15] songlei wang
Description:
 Change master need parameter MASTER_SSL or GET_MASTER_PUBLIC_KEY to build a secure connection when the user' auth plugin is caching_sha2_password, or io_thread will connect to server  failed after starting slave.

if the replication with caching_sha2_password account start failed due to insecure connection, the show slave status just show "Last_IO_Error: error connecting to master 'repl@127.0.0.1:18001'". error-log also has no Specific information about it.

we can not know why connecting to master failed.

How to repeat:
1. create replication user in master
master:
CREATE USER 'repl'@'%' IDENTIFIED BY 'repl';
grant REPLICATION CLIENT,REPLICATION SLAVE on *.* to 'repl'@'%';

2. change master(insecure connection)
slave:
 CHANGE MASTER TO 
  MASTER_HOST = '127.0.0.1', 
  MASTER_USER = 'repl', 
  MASTER_PASSWORD = 'repl', 
  MASTER_PORT = 3306, 
  MASTER_AUTO_POSITION = 1;

3. start slave;
4. show slave status
the Last_IO_Error will show "error connecting to master 'repl@127.0.0.1:18001'"

refer to https://bugs.mysql.com/96149
if we connect to server successfully using the user 'repl' before, then 'start slave' will success. The replication will work well both with caching_sha2_password account and insecure connection.

Suggested fix:
'show slave status' show the proper error messge just like "Authentication plugin 'caching_sha2_password' reported error: Authentication requires secure connection."
[10 Jul 2019 11:34] MySQL Verification Team
Hello songlei wang,

Thank you for the report.

regards,
Umesh

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.