WordPress.org

Ready to get started?Download WordPress

Forums

Database not connecting (4 posts)

  1. FlashDesigns
    Member
    Posted 2 years ago #

    Hi Folks

    I am moving a WP site from one server to another and have done this successfully several times with no problems. However in this particular instance I have uploaded the site directory structure and when I create a new database I get connectivity...however, when I import the database tables I get an "error establishing database connection" when the path, username and password have not changed! the minute delete the site and create another new blank database I get connectivity again...

    I can only assume that there must be a permissions issue within the database itself, although my understanding is that if there is connectivity the site will work as it has in the past.

    The site in question is http://www.soularteband.com

    Thanks so much for any help!

  2. Krishna
    Volunteer Moderator
    Posted 2 years ago #

    Did you drop the tables of the existing database before importing and check your database username, password, db name, and db host in the config.php file? Error Establishing Database Connection is usually associated with correct entries in the config.php file.

    There is another aspect: your site is also returning error: HTTP/1.1 500 Internal Server Error. The cause could be anything including your server configuration for which you need to contact your host.

  3. FlashDesigns
    Member
    Posted 2 years ago #

    Hi Krishna

    The "blank" database is connecting fine and then disconnects when I import the database into it. Does the database itself contain the username and password or can you import the contents of the database into a new database and set the config.php file accordingly? As stated in my original thread I only lose connectivity when I import the data from the database into the new one, which is connecting fine until the tables from the old database are imported.

    Andy

  4. fonglh
    Member
    Posted 2 years ago #

    Are you importing the mysql database as well? You only need to import the database with the WordPress tables.

Topic Closed

This topic has been closed to new replies.

About this Topic