On replica Master_User should be blank if not storing in slave_master_info

Description

Issue:
While configuring replica mentioning MASTER_USER and MASTER_PASSWORD is not safe as we get a warning for the same.

example:

As result not mentioning MASTER_USER and MASTER_PASSWORD in CHANGE MASTER TO command and mentioning MASTER_USER and MASTER_PASSWORD while starting replica as follows,

 

 

As we can see in the metadata table mysql.slave_master_info, User_name and User_password is blank.

All good at this point.

Now when the replica mysql server restarted, replication starts automatically and failed with error,

Last_IO_Error: error connecting to master 'test@127.0.0.1:23609' - retry-time: 60 retries: 1

example:

 

 

Expectation:
As we can see in the example it's trying to start replication with a test username, but we did not use test user or have in mysql server user list. So username should be blank in "show slave status" and in mysql.slave_master_info and should NOT use any default user which is confusing for the user.

 

 Test:

 

 

Environment

None

AFFECTED CS IDs

CS0019277

Smart Checklist

Activity

Show:

Francisco Miguel Biete Banon July 13, 2021 at 10:02 AM

Can this commit be backported to 5.7 series? From what I saw is just 1 line code change, rest are test cases...

Lalit Choudhary July 13, 2021 at 8:23 AM

not reproducible in 8.0  

PS 8.0.23

 

 

Venkatesh Prasad July 12, 2021 at 6:01 PM
Edited

 Looks like the same has been fixed in MySQL-8.0.21 by https://github.com/mysql/mysql-server/commit/304e920403cecaab9a45834d041bc2ea5a0d2a57  Can you please check once in the latest .0?

Done

Details

Assignee

Reporter

Labels

Time tracking

5h 15m logged

Affects versions

Priority

Smart Checklist

Created July 6, 2021 at 12:22 PM
Updated March 6, 2024 at 10:31 AM
Resolved December 17, 2021 at 9:41 AM