We already have blog posts about Dual Password in MySQL from Brian Sumpter – Using MySQL 8 Dual Passwords, and from Marco Tusa – MySQL Dual Passwords – How To Manage Them Programmatically

Let’s skip the details about dual passwords and focus on tracking password usage.

How can we be sure that we are using the new password?

We received so many questions related to this feature, and here they are;

  • How can I keep track of the passwords I am using?
  • Is there a way to check if my application still works with the old password?

When changing the application password while utilizing the dual password feature, it’s important to determine which password is currently in use and whether the application is still relying on the old one. There aren’t many places to check for confirmation on which password is being used.

After reviewing the code, there is a way to check, but it’s an insufficient way:

If an old password is used, it will be logged in performance_schema.error_log if the log verbosity is set to 3.

To identify users who have an additional password:

Here is what it looks like:

Note: It needs to increase verbosity 3 to see that information.

Conclusion

Dual password support in MySQL 8.0 is an essential feature, while password rotation simplifies compliance with security policies. However, checking which password was used is still hard to detect, and my colleague Yoann created a feature request for this. So, keep an eye on feature request  #115973 and ensure you test dual passwords thoroughly in your environment before adopting them in production.

Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments