DBI connect failed

6 posts / 0 new
Last post
#1 Mon, 08/13/2012 - 18:24
gabyale22

DBI connect failed

Hi

Please I need help because I got the next error and I dont know how to fix it.

DBI connect failed : Access denied for user 'user'@'localhost' (using password: YES)

It hapens when I try to change the password for any user that I have register in my server.

Thanks.

Mon, 08/13/2012 - 23:44
andreychek

Hmm, I'm curious if we're able to trigger that error in other cases, or if it purely occurs when changing passwords.

One way we can test that is to install an Install Script, such as RoundCube, into one of your domains.

If you attempt that, does it work properly?

Also, if you go into System Settings -> Server Templates -> Default -> Administrative User, what is "Store clear text passwords" set to?

-Eric

Fri, 08/17/2012 - 05:52
Locutus

I'm testing Virtualmin 3.93 Pro on an Ubuntu 12.04 now, and am running into a similar issue.

I created a test domain and tried to install Wordpress using the script installer. No matter if I make a top-level server or sub-server, install it into a new database or an existing one, I get this error:

Now installing WordPress version 3.4.1 ..
 Database connection failed : DBI connect failed : Access denied for user 'tiatest'@'localhost' (using password: YES) 1360.

User "tiatest" exists in MySQL and has full access to the database in question. Clear-text passwords is active. The password for tiatest can be fetched in Virtualmin, and I made sure that PW is also set in MySQL.

Fri, 08/17/2012 - 07:09
Locutus

After some more testing, I found out that in Ubuntu 12's MySQL the hostname "any" (or pattern "%" in the users table) obviously does not include "localhost" anymore. I had to add a second user entry for tiatest with hostname "localhost" to allow them access from localhost.

Before, this always worked and % included localhost too. Well, I guess there must be a reason why MySQL always creates the root user with three variants, "localhost", "127.0.0.1" and "".

Anyone experienced that before?

For Virtualmin, this means that, when creating a new domain with the "MySQL" feature active, the MySQL user has to be added in two forms, "%" and "localhost" as host. Right now, VM only creates the "%" form. Whereas when creating new users in a domain, they get three forms, "%", "127.0.0.1", and "localhost". This can be declared a bug I guess. I'll open up an issue concerning this.

Fri, 08/17/2012 - 09:58
andreychek

That's an interesting issue you guys are seeing there.

I'm a little surprised that hasn't come up previously though, as that sounds like an issue that would affect all MySQL databases on Ubuntu 12.04.

I'm wondering if there's a specific set of triggers for that.

Looking at my Ubuntu 12.04 system, all the host entries use "localhost", and not "%".

A bug report is a good way to figure this out though, and then Jamie can help work out why that might be happening.

-Eric

Fri, 08/17/2012 - 17:43
Locutus

To finish this up, as Jamie said in the bug report, it is configurable in the server template which hosts Virtualmin uses for administrative users of newly created servers.

So my observation might or might not be related to what the original reporter here observed.

Topic locked