WordPress.org

Ready to get started?Download WordPress

Forums

how to re connect database to wordpress (5 posts)

  1. Stingraynut
    Member
    Posted 5 years ago #

    I accidentally deleted the database. Luckily it was retreived from server backup and replaced but the website won't load and I can't access wp-admin using http://www.mydomain.com/wp-admin (replacing mydomain with the correct name)

    I have downloaded the database as a .sql file.
    I have looked at wp-config and checked the database name is correct, also tried various combinations of user and password because the user should have been admin and wasn't and the password was a code of 12 letters.

    I have checked in MySql and decoded the MD5 password, and it is correct.
    Also checked I am named as a user in MySql

    I have checked and all wordpress folders etc are still existing, it was just the DB I deleted in error.

    I expect the answer is simple, but what do I do to reconnect the database with the wordpress website?

  2. MichaelH
    Member
    Posted 5 years ago #

    I have downloaded the database as a .sql file.

    Don't you have to restore that database via something like phpMyAdmin?

    See: Restoring_Your_Database_From_Backup

  3. Stingraynut
    Member
    Posted 5 years ago #

    My host replaced the database that I deleted in error and it's visible in PHP MyAdmin. I meant I had also downloaded it so I have a copy.

    I have been looking at the user name and password, but realise now that I have been on the wrong track because all I want initially is to have the website back up and viewers don't need passwords etc.

    Somehow the database has become unnattached from the wordpress installation.

  4. Stingraynut
    Member
    Posted 5 years ago #

    I have started again with a new subdomain.

    Installed wordpress using Fantastico

    Site comes up, I log in OK

    using phpMyadmin I go to the new empty database just created (wp_wrdp5), select Import, and import the database that was auto saved by my host.

    Refresh website and get a blank page

    refresh Dashboard and get error message "Error establishing a database connection"

    I have also tried importing a database I saved a while ago with no luck.

    Somehow the wordpress installation recognises wp_wrdp5 before the import but not after?

    I have tried this 4 times now, wiping everything each time, including resetting the fantastico data "$installed_in_root["phalkunz.com"] = 1;. " back to 0.

    I have also tried deleting posts and pages immediately after the wordpress install, before importing new database - same result.

    What the heck am I doing wrong?

  5. Stingraynut
    Member
    Posted 5 years ago #

    UPDATE- I'm still unsuccesful.

    I have solved the error message, which was a wp-config file problem.

    But when I import the saved database I get a blank page- also if I import either of my last backups. The backups are .sql files, not xml backups from the dashboard.

    I can now import the default database back in after getting the blank page, display the page and can access the dashboard.

    Any ideas?

Topic Closed

This topic has been closed to new replies.

About this Topic