Disabling virtualserver ... mysql errors (caching_sha2_password)

SYSTEM INFORMATION
OS type and version Ubuntu 20.04
Webmin version LATEST
Virtualmin version LATEST
Related packages SUGGESTED
I get these errors everytime i try disable a virtualserver:
Locking MySQL user's password ..
.. MySQL database failed! : mysql::execute_sql_logged failed : SQL alter user 'myservername'@'localhost' identified with caching_sha2_password by 'VyWQb02fTw4kI6tP' failed : Your password does not satisfy the current policy requirements

I tried googling and i understand is a error based on mysql 8 security level.
How can i fix it in virtualmin?
That caching_sha2_password it is autogenerated, because is not my password set for that mysql virtualserver.
I even change password for mysql of that server several time differently and still i get this error when i disable.

I think this is a mysql issue not virtualmin. Googling sounds like you have extra security then a default install.
What I read you have a validate password addon on mysql.
If you login to mysql and run the command SHOW VARIABLES LIKE ‘validate_password%’;
do you get a response? On mine I do not.

Whats strange is you can change passwords no problem, just on disable not working.

In the Associate and Dis-Associate Features section can you untick mysql?

Failed to execute SQL : SQL SHOW VARIABLES LIKE ‘validate_password%’; failed : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '‘validate_password%’' at line 1

If you mean at “edit virtual server- enabled features”, then yes i can unthick box for mysql with no problem. The website just works fine, but when i disable that error pops and when i visit that website it throw error instead of that default virtualmin page where is specified that domain is disabled.

You need to login to sql (with username and password) first.

I meant here

Ok, it was working when i unthicked mysql from Disassociate Features.
I also run

SET GLOBAL validate_password_policy=LOW;

And the error with caching_sha_2 is gone, but when i disable, the server will not show that default virtualmin page when it says “website disabled” ,
Only if i unthink that mysql from disassociate features it shows correctly the page disabled.
Is something wrong my database, this virtualserver i have it since mysql v5 i think, with 6-7 years old that i migrated from ubuntu 16 to 18 and now to 20.04
BTW i am logged as a root, so i don’t think is a priviledge issue when i try command line in mysql.

Output from SQL command SHOW VARIABLES LIKE ‘validate_password.%’; …
No data returned

Now it worked that command!

Sounds like you close to having it working again.
So if you go back before disabling the virtualserver and associate the mysqld to the server, does disabling now work?

No data returned ok, that spoils everything :frowning:

What do you get when you run SET GLOBAL validate_password.policy=LOW;

1 Like

Well, this is truely strange. I tested other virtualservers to disable and they don’t show error when i disable but i get error reaching that website, instead of default website disabled by virtualmin.
But now i re-tested initial virtualserver and it is working :).
What the hell is this!
Look at initial virtualserver after disable:


Then i tested disable on another virtualserver

and i get error when i test website

1 Like

Yeah I know the feeling :slight_smile: Fix something and your not sure how :slight_smile: all good

It is either redis caching that i installed on server, or some weird dns problem ?
I solved somehow with your lead.
So, basically i unthik box for myslq at disassociat features, then i disable server. After that i thick back the box for mysql and enabling back server, then i disable and is working.

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.