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

1 Answer 1


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';
  • I didn't know there was another! Thank you. There is still one more problem though, it is saying I am using the password "Yes" still, despite the fact that I state the password in $db_url.
    – aceslowman
    Aug 3, 2012 at 16:33
  • That string using password: YES is boolean. It will always say YES when you use any password, or NO when you don't use a password.
    – JamesK
    Aug 7, 2012 at 17:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.