-
Make backup of /usr/libexec/webmin/virtual-server/feature-mysql.pl >> cp /usr/libexec/webmin/virtual-server/feature-mysql.pl /usr/libexec/webmin/virtual-server/feature-mysql.pl_OR
-
Install Perl SHA1 library ( Thanx Baterka !! )
root# perl -MCPAN -e shell
cpan> install Digest::SHA1
- Upgrade MariaDB (Only installing new version is not enough!)
root# mysql_upgrade
- make following patches to: /usr/libexec/webmin/virtual-server/feature-mysql.pl
- Comment or delete line: 2753
[add this 2 lines]
use Digest::SHA1 qw(sha1 sha1_hex);
return (“INSERT INTO global_priv
(Host
, User
, Priv
) VALUES (’$host’, ‘$user’, '{“access”:”.time().",“plugin”:“mysql_native_password”,“authentication_string”:""."*".uc sha1_hex(sha1($plainpass))."",“password_last_changed”:".time()."}’)");
- Comment or delete line: 2756
[add this 2 lines again:]
use Digest::SHA1 qw(sha1 sha1_hex);
return (“INSERT INTO global_priv
(Host
, User
, Priv
) VALUES (’$host’, ‘$user’, '{“access”:”.time().",“plugin”:“mysql_native_password”,“authentication_string”:""."*".uc sha1_hex(sha1($plainpass))."",“password_last_changed”:".time()."}’)");
- Comment or delete line(s): 2787&2788
[add this:]
my $mpass=uc sha1_hex(sha1($plainpass));
$sql = "update global_priv set Priv = '{\"access\":".time().",\"plugin\":\"mysql_native_password\",\"authentication_string\":\"*$mpass\",\"password_last_changed\":".time()."}' where user = '$user'";
-------------------- END
See the code @ https://pastebin.com/FuZ8aqfQ
Finaly restart webmin >> systemctl restart webmin
AND VOILA !!! Now EVERYTHING its GREAT !!! You can create DB and change user DB passwords !!!
PS: I will contact with Virtualmin Team to add this fix to next updates !!!
Regards
Christos Tzeremes
IT Expert @ nasa.gr
Thessalonikh GREECE [MACEDONIA]
ctzeremes[at]nasa.gr