I accidentally deleted my database in local Drupal 6.16 installation and tried reinstalling and kept getting the error message below.
"Failed to connect to your MySQL database server. MySQL reports the following message: Access denied for user 'igbonine'@'localhost' (using password: YES).
Are you sure you have the correct username and password?
Are you sure that you have typed the correct database hostname?
Are you sure that the database server is running?"

Comments

cog.rusty’s picture

Replace your sites/default/settings.php file with a fresh copy of default.settings.php from your site or from a drupal package, which does not contain your database connection information in the $db_url line. Otherwise Drupal's installer will consider your site already installed and will try to connect.

Make sure that your database user has the privileges required for your new database.

If this does not solve the problem, try to switch between mysql:// and mysqli:// (whichever you have, try the other one).

igbonine’s picture

Thanks!
The first part solved my problem.