Create New domen error password MariaDB

SYSTEM INFORMATION
Ubuntu 22.04 REQUIRED
Virtualmin 7.9.0 REQUIRED

I installed a clean Virtualmin on Ubuntu 22.04 and when I create a new virtual server, I cannot connect to the database using this password.

mysqli::real_connect(): (HY000/1045): Access denied for user 'user'@'localhost'

Every time you have to recreate the password again through the console

mysql -u root mysql

SET PASSWORD FOR user@localhost=PASSWORD("...");

service mysqld stop

And after that they will only be able to connect to the database again

How can this be fixed?

We have added support for keeping default MariaDB socket authentication but we forgot to update the message in config check. It will be fix in the next minor Virtualmin release.

You shouldn’t have set MariaDB root password really. But if you did, you should have done it using Webmin / Servers ⇾ MariaDB Database Server module. Because, if you set the MariaDB root password outside of Webmin, the module won’t simply know how to connect to the database.

I didn’t set a password. If you set the root password. Then after restarting the server. MariaDB just stops running

If after rebooting the system (server) using reboot command, MariaDB isn’t starting automatically you can fix this by running the following command:

systemctl enable mariadb


Yes, it starts with a password now. But the password still doesn’t work until I specify the password for the user in the console

SET PASSWORD FOR user@localhost=PASSWORD("...");

phpMyAdmin doesn’t work because you need authenticate. You should set root password for MariaDB in Webmin module for phpMyAdmin to work.

@Jamie, I’m afraid leaving out Unix authentication may confuse some users. We should make it optional in wizard!

No. They aren’t trying to authenticate as root in phpMyAdmin, they don’t need a root password set!

No more options in the wizard!

A user won’t be able to authenticate in phpMyAdmin with root user if MariaDB socket authentication enabled!

It isn’t a new option. We already have it. We just need to say instead of Leave unchanged, something like Leave Unix socket authentication enabled (and probably not recommend it).

I mean in here:

Sorry, but there is no such option in the latest version of the installation. In previous versions, there was such an option. But not the last one. I noticed it right away. That is, you cannot set the MariaDB password during installation.

As for phpMyAdmin, I installed it separately from the phpMyAdmin website.

They aren’t using the root user! Look at the screenshot!

If so, then the issues are completely unrelated.

If a user cannot authenticate using that given username, then the password for this particular user is not correct or permissions are off.

Either way, I’m pretty confident that it isn’t Virtualmin issue. It works flawlessly for me in all possible tests using clean install.

Hello,
Hello,
I can confirm, I’ve just done a new debian installation of virtualmin and we don’t have a choice at this stage, just the message:

“MariaDB is using Unix socket authentication for the root user, so the password cannot be changed.”