I was recently running drupal on a windows machine with WAMP. I finally migrated from windows to ubuntu. Before I made the switch I backed up my database and various other important files. It wasn't until I wiped windows, booted up ubuntu, restored my files that I realized I didn't back up my actual website. *facepalm*

Well, at least I have my database.

I downloaded drupal 6.17 and tried to install it using my restored database. I put in mysql details, and the installer tells me "drupal is already installed." This tells me that the mysql credentials were correct, no? I deactivated all unnecessary modules in the database by setting status = 0.

When I go to http://localhost, I get:

  • warning: mysql_pconnect(): Access denied for user 'USER'@'MYSITE.com' (using password: YES) in /var/www/includes/common.inc(1699) : eval()'d code on line 7.
  • user error: Access denied for user 'USER'@'MYSITE.com' (using password: YES) in /var/www/includes/common.inc(1699) : eval()'d code on line 7.

The problem is, my settings.php has: $db_url = 'mysqli://SOMETHING:PASSWORD@localhost/drupal';

Notice the username and server are different. The error on the site shows my OLD credentials from before I migrated to ubuntu. Where is it getting this info? Regardless of what I put in default/settings.php, the mysql error always says the same thing.

I've deleted all my cache tables. Furthermore, the page shows my website name as defined in the database...

The only page I can manually enter is /update.php (which I am allowed to run the script by editing settings.php)

Any ideas?

Comments

cog.rusty’s picture

Notice the "eval()'d code on line 7". This looks like custom code which contains a "mysql_pconnect()" on line 7. It is not about Drupal's database connection. I don't think drupal even uses pconnect anywhere.

Look for this code in your content ("node_revisions" table) or in your blocks ("boxes" table) or in your theme's template files.