I'm pulling a site from my production server down to a new development server that I'm setting up.

I can't get this to work though unfortunately. I imported my database into mysql and made sure that all of my account/privileges information was correct with what I had in my site-root/settings.php file. I even created a new account with all the privledges and edited my settings.php file to it and still couldn't get it to work.

Is there somewhere else in my drupal installation that I need to input this information that I'm not aware of? As a side note, I have other sites running locally in the same development environment, and they're running fine, however, I've noticed that they don't have a settings.php file.


This installation was originally created in MS WebMatrix using the Acquia Distribution As far as I can tell there's not a huge difference between this and other drupal distros beyond it having some really basic stuff already included. My other sites, that work, are running bear distro and my development server is just your basic XAMPP setup.

This is what's in my settings.php file. Obviously, the db, user and passwords where all replaced with comments for security reasons. You'll just have to trust me that they match up.

$databases = array( 'default' => array( 'default' => array ('database' => '####commented for security###', 'username' => '####commented for security###', 'password' => '####commented for security###', 'host' => 'localhost', 'driver' => 'mysql', 'port' => '3306', 'prefix' => '' ) ) );

Here is a screenshot: Screenshot of error

Thanks in advance for your time!

1 Answer 1


The default settings.php is located at sites/default/settings.php, not in the root of your drupal installation. I have no idea why one of the server techs at my hosting company moved the settings.php into the root, but that was what my previous confusion was.

As a side-note, if your moving from a production to a development server, make sure that you setup your host in settings.php to localhost. As a corollary, if you're moving from development to production, make sure you set your host field from youraddress.com (or youraddress.hostingaddress.com) from localhost. It would be nice if there was a field somewhere in drupal settings to handle this, so that you didn't have to snoop through the settings.php to find/set it. However though, this is likely not possible since drupal pulls everything like this from databases and it has to have these settings in order to see the database. Just food for thought.

I also normally find it useful to look at code snippets rather than trying to understand what someone said, so here's an example of what your database line in settings.php should look like if your settings up a generally basic development server.

$databases = array ( 
  'default' => 
        'default' => 
         array (
            'database' => '##Your_database_name##', 
            'username' => '##your_database_username#', #comment & store old user from production server here for safe keeping
            'password' => '##your_database_password##', #comment & store old pw from production server here for safe keeping
            'host' => 'localhost',   #comment and store production database url here
            'driver' => 'mysql', 
            'port' => '',  #localhost shouldn't normally need a port, but your production sever likely does, so comment and store that on the side here.
            'prefix' => ''

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.