Custom MySQL password management issue

Hi,

It looks like there is something weird with MySQL Password management. Server creation stores the password if the authentication_string column whereas editing custom password updates the Password column.

The Custom password only is confirmed after the second try (maybe something to do with the pass_set thing ?)

Action : Server Creation
LOGS:
insert into user (host, user, ssl_type, ssl_cipher, x509_issuer, x509_subject, plugin, authentication_string) values (‘localhost’, ‘USER’, ‘’, ‘’, ‘’, ‘’, ‘mysql_native_password’, password(‘GLOBALPASS’))
State : MySQL Login works with DEFAULTPASS

Action : Set Custom DB password
LOGS:
set password for ‘USER’@‘localhost’ = password(‘CUSTOMPASS’)

mysql_pass=CUSTOMPASS
State : MySQL Login doesn’t work with CUSTOMPASS

Undo custom DB password :
LOGS:
set password for ‘USER’@‘localhost’ = password(‘GLOBALPASS’)
< mysql_pass=CUSTOMPASS
< pass_set=0
State : MySQL Login works with DEFAULTPASS

Action :Set Custom DB password (again)
LOGS:
set password for ‘USER’@‘localhost’ = password(‘CUSTOMPASS’)

mysql_pass=CUSTOMPASS
State : MySQL Login works with CUSTOMPASS

Actually, i’ve seen the password being “randomly” ignored and I did have to set it again after resetting it.

Environnement :
Webmin 1.941
Virtualmin 6.08

Regards,
X

Hi,

We are working on bringing support for latest MariaDB versions.

If your MariaDB version is lower that 10.4, you can work-around this problem by going to Webmin/MySQL Database Server/User Permissions/Edit User or use custom console queries for now.

Sorry.

Hi,

Running this after setting a custom MySQL password for a server works as a workaround :

update mysql.user set authentication_string=Password where password != ‘’ and plugin=‘mysql_native_password’;

Best regards,
X

We have a fix already for changing passwords for db users. Give it a try.