MySQL database password is always randomly generated

Virtualmin GPL 3.88

When creating a virtual server using the Default Template and Default Plan, the resulting MySQL database password is always randomly generated no matter if I set “Keep MySQL and administration passwords in sync?” to yes or no.

After creating the virtual server and going to Edit Databases -> Passwords, I see “This form can be used to change the primary database passwords for this virtual server. By default they are kept the same as the server’s administration password.” - but the displayed database password is not the same as the administrative password.

How can the administrative and database passwords be kept the same by default without manual intervention?

Thanks for any advice.

I have the same problem

I am facing the same problem. Maybe as the user password and the root password are identical Virtualmin doesn’t allow that and generates a random password…

Howdy,

The issue you’re seeing is intentional, and is due to using hashed passwords.

If you selected the hashed passwords option while setting up Virtualmin, MySQL users will indeed use randomly generated passwords… if they weren’t using random passwords, that would negate the benefit of using hashed passwords, since that MySQL password is stored in plain text.

-Eric

WOW - I posted this query over a year ago. :wink:

Thanks for the answer Andreychek. Makes absolutely sense what you are saying. Thank you. The issue is solved.

Suggestion for the developers: Well, still, it is not consistent with what the user tells the system… If the user wants automatically identical passwords for his account and MySQL, so be it !!! The system should just do this… and not something else (out of integrity considerations…)

Now the practical application: Each time I generate a new Virtual User, I have to click until the freaking MySQl password and adjust to be identical… takes like twice the time now to setup a new virtual user… this should be changed !!! Clearly.

Hi there!

I’m just confused, but what does hashed have to do with random ?

Why wouldn’t the MySQL password be the hashed version of the inserted password ?

Also, can you tell me, how to get the generated password ? Or is it generated just random with the intention of being reset just afterwards ?

Thanks

— Telmo

Here’s a quick video on how to find MySQL username and password for a virtual server in Virtualmin,
https://www.youtube.com/watch?v=Z7GfuSjbZBg