If your installing Drupal (even on localhost) if you get stuck on the Database Configuration page open ./sites/default/settings.php and change the $db_url variable to your database settings.
Depending on the type of database your using this is what your variable will look like.
$db_url = ‘mysql://username:password@localhost/databasename’;
$db_url = ‘mysqli://username:password@localhost/databasename’;
$db_url = ‘pgsql://username:password@localhost/databasename’;
In the case of my localhost install that line would be:
$db_url = ‘mysql://root:root@localhost/drupal’;
Drupal being the name of my database. Username and password are always root with mamp.



thanks guys it reallyy worked for me
Thanks a lot.
if i have username as root and password is nothing then how should i write $db_url ?
$db_url = ‘mysqli://root:”@localhost/drupal’;
OR
$db_url = ‘mysqli://root:@localhost/drupal’;
I Checked both ways. Tell me the correct way.
If possible mail me at vikasgarg40@gmail.com
Thanks for helping me solve this annoying problem!
Thanks for the info!!! big help. ^^