mysql has added a nice feature called "dual password support". would be nice to have it in the module as well (along with the already worked on caching-sha2 support).
see https://dev.mysql.com/doc/refman/8.0/en/password-management.html#dual-passwords
basically, do variants of the alter user are required:
To set a new password, while keeping the previous one:
ALTER USER 'appuser1'@'host1.example.com'
IDENTIFIED BY 'password_b'
RETAIN CURRENT PASSWORD;
And to remove the previous password once it is no longer needed:
ALTER USER 'appuser1'@'host1.example.com'
DISCARD OLD PASSWORD;