Database error - Migration from Plesk

Hello everyone,

I’m trying to migrate a virtual server from Plesk to Virtualmin.
I’ve succesfully imported the backup. However, I had to manually imported the http files. (I thought it was contained in the backup?) Anyway, I manage to paste the files into the correct directory.
But everytime I try to the webpage, I get the error displayed “Error when connecting to the database”.

Here’s the logs from mysql :

2020-03-28 9:56:42 53 [Warning] Access denied for user 'user_ugo_ddb19'@'localhost' (using password: YES)

But I manage to connect manually :

root@instance-dev-betg:/var/log/mysql# mysql -u user_ugo_ddb19 -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 60
Server version: 10.3.22-MariaDB-0+deb10u1 Debian 10

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>

I’ve pasted a thousand time the correct password into the configuration utility for this virtual host :

What am I missing ? Thanks in advance :slight_smile:
Cheers

Hi,

There was a bug that can be easily fixed by replacing feature-mysql.pl file in /usr/share/webmin/virtual-server directory and restarting Webmin with /etc/webmin/restart, and then, make sure to change your database password, to have it updated properly.

Hello,
Thanks for your reply.
I’ve done the steps you describe, however, I still have the same issue. Do you have another idea ?
See :

root@instance-dev-betg:/usr/share/webmin/virtual-server# cat feature-mysql.pl | grep '"password ".$encpass))'
                            : "password ".$encpass));
root@instance-dev-betg:/usr/share/webmin/virtual-server# /etc/webmin/restart
Stopping Webmin server in /usr/share/webmin
Starting Webmin server in /usr/share/webmin
root@instance-dev-betg:/usr/share/webmin/virtual-server#


root@instance-dev-betg:/usr/share/webmin/virtual-server# tail -2 /var/log/mysql/error.log
2020-03-28 15:27:44 232 [Warning] Access denied for user 'user_ugo_ddb19'@'localhost' (using password: YES)
2020-03-28 15:27:46 233 [Warning] Access denied for user 'user_ugo_ddb19'@'localhost' (using password: YES)

I’ve managed to resolve my issue by adding this line in my msql conf :
skip-grant-tables

That “solution” has security issues, and enables anyone to connect without a password and with all privileges!

I’ve done the steps you describe, however, I still have the same issue. Do you have another idea ?

Have you restarted Webmin and tried changing password afterwards for the user in Edit Databases:

Can you connect to db as root in Webmin/Servers/MySQL Database Server:

Yes I did changed the password after restarting webmin for the user “user_ugo_ddb19”, but not where you mentioned.
I dont understand why I need to change the administrator password (your first screen) if the problem is with the user “user_ugo_ddb19” ?

And in your second screen, I dont see where you can “test” databases connections ?

I have no idea what users do you have. It’s not admin password but db user password for given virtual-server. The main point, is to make sure that you can connect to database using the password that is expected by the app. Passwords must be in sync - that’s all. After applying the patch I mentioned, just change the password to something else and then back to what is expected.

And in your second screen, I don’t see where you can “test” databases connections ?

If it’s connected, then you see that screen, I shared.