Is there anyway to hide the plain text password in mysql.slave_master_info?

Is there anyway to hide the plain text password in mysql.slave_master_info?

You can select * from mysql.slave_master_info and it show the password in plain text…

2 Likes

Hello @ipcmlr,
Yes, you can hide the password by including it in your START REPLICA command. For example,

START REPLICA USER='repUser' PASSWORD='fooPassword';

You may need to first RESET REPLICA ALL to clear out the data from the table and then re-run your CHANGE REPLICATION SOURCE TO ... to set the source hostname/port/position/etc.

Keep in mind that if replication breaks, or needs to be restarted for any reason, you must always provide the UN/PW as shown above. This is tradeoff between flexibility and security.

You could also configure a user with no password and force SSL connections for replication and authenticate using SSL certificates.

3 Likes