Forums

Database import - need assistance (11 posts)

  1. Comodo2010
    Member
    Posted 7 months ago #

    Hello

    I recently moved a friends site to a new host, and forgot to back up her old database. Yes, stupid, I know. Anyway, I did get a hold of the dump file after a lot of mails back and forth with the hosting-company.

    Name of file:
    Dump20111005.sql

    Now, I need help with importing this into the new database without fucking everything up. Thing is, I know nothing about this, and her site really needs to be up now, because of work applications. Can someone assist me with this?

    I am willing to grant full access to the right person. And will send waves of digital goodwill!

    Site is found here: http://www.monicasholm.com

  2. Dhikra
    Member
    Posted 7 months ago #

    You might want to follow the instructions from here:
    http://codex.wordpress.org/Restoring_Your_Database_From_Backup

  3. Comodo2010
    Member
    Posted 7 months ago #

    Mhm, yeah, read that one, but dont you have to delete all the old tables first? And the variables you have to select when importing, I have no idea which ones to pick. utf-8?

  4. Comodo2010
    Member
    Posted 7 months ago #

    I got this error when trying to upload the .sql file.

    Error
    SQL-query:

    --
    -- Current Database: monicasholm
    --
    CREATE DATABASE /*!32312 IF NOT EXISTS*/ monicasholm /*!40100 DEFAULT CHARACTER SET latin1 COLLATE latin1_danish_ci */;

    MySQL said:

    #1044 - Access denied for user 'monicspm'@'localhost' to database 'monicasholm'

  5. Dhikra
    Member
    Posted 7 months ago #

    Create a database with the same name, user, and password as the old one on the new server. This database will be empty.
    Then follow the instructions to restore the database via phpMyAdmin from the link I gave you.
    UTF-8 is the right encoding.

  6. Comodo2010
    Member
    Posted 7 months ago #

    New host allows 1 database only. So to create a new database I would have to delete the old one.

    Are you saying I should do everything in this order:

    1. Delete database and remove all files from server.
    2. Create new database
    3. Import sql file
    4. Install new WP
    5. Upload old files via ftp
    6. Activate "old" theme

    Then it should work fine?

  7. Dhikra
    Member
    Posted 7 months ago #

    If the new site is identical to the old one (i.e. nothing changes, not even the url), then you don't need to do all that.
    Just delete the database, create a new one with the same name, username, and password as the old one, and import the old one into it.
    It should work.

    If it doesn't, then post the errors you get in here.

  8. Comodo2010
    Member
    Posted 7 months ago #

    Ok did it, and got the old tables back in the new database. But wordpress dont seem to "understand" that they are there. Nothing shows up.

    Do I need to reinstall WP and relink it to the database?

  9. Dhikra
    Member
    Posted 7 months ago #

    Try to choose the same permalink structure you were using on the old site.

  10. Comodo2010
    Member
    Posted 7 months ago #

    Just had to update the php config file with the proper databasename -_-
    Now everything works.

    Please call me terrible names as you please.

    Thx for the effort Dhikra!

  11. Dhikra
    Member
    Posted 7 months ago #

    That's why I had told you to give it the same name ;)

    I'm glad you got it working!

Reply

You must log in to post.

About this Topic