Attempting an installation with HEAD results in a failure on the databases setup screen when a username is provided, but a password is not. The error message clearly shows that the username is not being used in the connection attempt. Adding a password results in an error message which shows the username is in use.

Comments

David_Rothstein’s picture

Title: Failure to connect to MySQL DB without password » Failure to connect to MySQL DB without password doesn't show username in error message
Component: install system » database system

I can reproduce this - the error message looks like this:

Failed to connect to your database server. The server reports the following message: SQLSTATE[42000] [1044] Access denied for user ''@'localhost' to database 'drupal'.

It seems very unlikely to me that this is a Drupal bug though. (It could be related to http://bugs.php.net/bug.php?id=46457 and issues linked therein although those were marked fixed a while ago.)

Also, when I tested it, this did not actually prevent the connection in the case where the MySQL username did not have an associated password (leaving the password blank in that case still worked fine and allowed the installation to continue). This only occurred for the case where you need to provide a password but don't, so that you would expect some kind of error message either way.

Was that your experience too? If so, this seems like only a minor bug.

catch’s picture

DamZ noticed that the default implementation of cache_get() just eats exceptions, that was introduced with http://drupal.org/node/325169#comment-2593568 - which is why this points to lock_may_be_available(). Was introduced by this patch:

http://drupal.org/node/325169#comment-2593568

dcam’s picture

Issue summary: View changes
Status: Active » Closed (fixed)

I can't reproduce this old bug, neither when installing a fresh site nor when deleting the password from an existing site, so I'm closing the issue.