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

I tried to install WordPress on a new domain, which usually works like charm.

In this case the domain name either might have been too long or the "double extension" like "co.uk" gave a problem resulting in "database connection failed".

I shortened the user name, deleted the database, checked the database access ("ALL" rights from localhost) - but I am still getting the error.

This brings me to the following questions:

  • What happened?
  • Is this a known error, which I could circumvent prior to installation?
  • How can I fix my issue now?

Thank you very much in advance!

Status: 
Active

Comments

Is the username longer than 16 characters?

Initially the domain name has been shortened to "longdomainname.co." and I shortened it afterwards to "longdomainname" which currently has only twelve characters.

What happens if you go in and reset the database password (in Edit Databases -> Passwords), does it work for you after that?

Does this still happen if you create a new test domain with a shorter name, and see if it can access MySQL?

@andreychek: I specified a new password and afterwards the script ran through - thank you! @Jamie: The script usually runs fine on all servers.

Now: how did this hickup happen? Shouldn't the script shorten the username and make use of the already set password? Why does it fail after changing the user name to a shorter version? Why did I have to specify a new password?

Ok, maybe the password is the issue. Did it contain any special (non-alphanumeric) characters?

After I set up the virtual server I did not specify anything. I just said "MySQL allowed". When running the script it somehow hung - and after setting a new user name and password manually, everything worked.

I am just wondering why the default install script was not able to cope with the long domain name and the default password.

Did you enter a password when creating the domain though, and if so did it contain any special characters?

Oh, sorry, I misunderstood your question in the first place. The password was characters, numbers and an exclamation mark - nothing too exotic.

I wonder if there is some password character that's triggering this problem on your system, like the exclamation mark? Some versions of MySQL have problems with some password characters (notably, backslashes)

Well, as I assigned the same password afterwards manually, I doubt that the exclamation mark could have caused the problem. Ah, well - let's close this and hope for the best with the next long domain name. ;)

Ok ... if you can figure out some consistent trigger for this bug (like a long domain name or password), please let us know.

I had this problem with a domain. The problem was that the password had a $ in it. Changed the password, problem solved.