Moving mysql databse to localhost for drupal core upgrade test


#1

I need to upgrade the Drupal 6 core and want to test it out on my local machine before I involve my site here.

I have used the phpMyadmin on the server side to export the database into localhost. I imported it into a new database, test1. I then brought everything under sites, modules etc to localhost. I checked settings.php:

$db_url = ‘mysqli://root@localhost/test1’;
$db_prefix = ‘’;

I am using the default login “root” for localhost

I keep getting this message below. It thinks my mysql user is stpeters and the host is incorrect.

Access denied for user ‘stpeters’@‘static-162-83-94-95.culp.east.verizon.net’ (using password: YES)

Any suggestions where to look ? Thanks


#2

The mysql user is stpeters, DH does not allow root login for databases at their site so the owner is always another name. Can you find and use the access info for this DB found at your DH panel?

Another thing to try is leaving off the password info and waiting to be prompted for it.


#3

I don’t think that the OP is trying to open a dreamhost database locally, I think he’s trying to open a local database locally.


#4

But wouldn’t the user and database info be the same, just on his local drive?


#5

<Can you find and use the access info for this DB found at your DH panel?>
I can’t find the owner’s name other than stpeters

On the local machine there is not a password
[hr]

<Can you find and use the access info for this DB found at your DH panel?>
I AM trying to open a Dreamhost database exported through PhpMyadmin
to a local database imported by PhpMyadmin to a database I created locally. I made sure the user of the database matched that is settings.php


#6

Since the database connection credentials are in settings.php, “stpeters” is going to be in there somewhere. It’s common for a settings.php file to have a few different sets of credentials in there - some commented out, some enclosed in some conditional (IF statement etc).

Search that file again and you’ll probably find it further down.

The next thing I’d check is whether you’ve got more than one settings.php file, e.g. /sites/default/settings.php and /sites/something-else.com/settings.php. In that case Drupal’s multisite feature could be messing with you.