Hello there.  We have scripts to restore credentials to MySQL databases from external store.  The mechanism that was in use, however, stores usernames and passwords, without consideration of the scope (host) of that auth record.  In older systems, UPDATE mysql.user SET password = PASSWORD(‘rawpassword’) WHERE user = ‘username’ worked, updating it for all values of that user that might exist in the table.

 

But, I’m not sure how to do this for MariaDB 10.5.  Is there way to form an “ALTER USER” statement such that it will set the password for any and all userspecs that exist with the given username?  We don’t have that many, and I could iterate the known configurations with “ALTER USER IF EXISTS”, but I worry that might miss things added in the future.

 

Thank you.

 

                        - Chris

 

-- 

Chris Ross

Software Engineering Manager – Eventing/Datastore Teams

cross2@cisco.com