The full MariaDB error message was : DBI connect failed : Access denied for user 'root'@'localhost' (using password: YES)?

SYSTEM INFORMATION
OS type and version UBUNTU 22.04
Virtualmin version 7.9.0

Hello! I have the following problem with the database. What I realized from the error is that it is because the host is on localhost. So I shut down the mariadb service, enter the mysql console in safe mode, change the host to 127.0.0.1. I try to start the service again but it doesn’t work. But while the service is off I manage to log in from phpMyAdmin. So I restart the server, the database starts but again the host is autoconfigured to localhost.
according to chatGpt the problem is due to a third party software that manages the database, so here it is. Any ideas?

I don’t know what that means. Of course it’s on localhost.

hello maestro, a pleasure to greet you. Look, when I connect to the mysql console if I don’t indicate the host it tells me ERROR 1045 (28000) access denied for root@localhost. On the other hand if I indicate the host. mysql -h 127.0.0.1 -u root … Login without problems

great. I have managed to start from webmin by changing the host in system connection. Now the problem is in phpMyAdmin.

maybe not related — somewhere is documented a quirk with mysql, and possibly some other software packages — localhost is treated differently than 127.0.0.1 – specifying localhost tells the software to connect to a unix socket, such as /var/lib/mysql/mysql.sock but 127.0.0.1 has the software connecting thru the network stack, typically on port 3306.

1 Like

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