There are several causes of this error. To figure out what's going on, look for a hash sign and a four-digit error code in front of this message. E.g. "#1045 Cannot log in to the MySQL server." This code is a MySQL error code, which comes in two varieties, 1XXX server codes and 2XXX client codes.
The two most common error codes are #1045 and #2002.
- Error code #1045
This typically indicates a problem with the username/password combination provided. That's definitely the first thing to check. It could also happen if you got your username and password right, but mistyped the DSN and happened to get another valid one that doesn't accept your info.
Also, if your member login (which is also your default MySQL username) is too long for MySQL, our system truncates it automatically, and you must use that instead. You can verify the correct username information by visiting the "mysql" tab and clicking on the name of the process (ending in ".db"), which is listed under the "DSN" column. Your MySQL default username is listed under "How to Access MySQL."
- Error code #2002
This indicates that the MySQL process didn't answer. In other words, it didn't even get as far as checking if your username and password were valid. This usually indicates a typo in the DSN, or that the MySQL process is not running. In rare cases, it may mean that the process is hung or deadlocked.
In some rare cases, if your MySQL process has existed for a long time without any updates to your password, it may be storing your password in a format phpMyAdmin can't authenticate against. (phpMyAdmin uses very recent PHP versions and extensions that are not compatible with archaic setups.) This will cause you to be unable to log in via phpMyAdmin, even with the correct username and password. In these cases, it is usually sufficient to change your MySQL password by another means (e.g. the command line), even if you "change" the password to the same thing.