Problems connecting to database in drupal 6 Whew, ok I am new to Drupal, and I am dealing with a outdated drupal site. Ive been told not to upgrade yet, so for now I am dealing with Drupal 6. I am trying to stage it on our test server, but it won't seem to connect to the database. (It returns a page that says "Site off-line" and "Deprecated: Function ereg() is deprecated in E:\development\ump_2010\includes\file.inc on line 926") Below that, it states that I could not connect to the database:

The mysql error was: Access denied for user 'root'@'localhost' (using password: YES).


I went into the settings.php file and changed $db_url to the correct one, and $db_prefix remains empty. Where is drupal getting 'localhost' and the password from as well?

Thanks,
Austin Slominski
All of those values are set in $db_url, in the sites/default/settings.php file.

$db_url = 'mysqli://username:password@server_ip_or_host/databasename';