WordPress.org

Ready to get started?Download WordPress

Forums

How to: Combine Databases? (6 posts)

  1. abcdefgary
    Member
    Posted 7 years ago #

    Hello, I've been looking to use the vBulletin Bridge add-on for WP and vBulletin. However, both of my databases for each of these are separate, and it says that it requires you to have both of them on the same database.

    I decided that it would be easy: just backup the WP database and export it in MyPHPAdmin into the vBulletin database.

    The thing is... I don't see an import button anywhere in MyPHPAdmin, only export.

    Am I heading the right direction? Thanks in advance for any help.

  2. jkozuch
    Member
    Posted 7 years ago #

    Here's what you do:

    Choose which database you want to use. Let's say you have database1 (vbulletin) and database2 (vbulletin bridge addon for wp), and you want to merge the contents of database2 with database1.

    Log into the phpmyadmin for database2, and when the phpmyadmin UI loads up, click the database name at the top of the left frame.

    This will load all your tables in the right hand frame.

    Click the tab called "Export", select all the tables from the list, select "SQL" from the options below the list, then check off the box at the bottom called "Save as file", give it a file name, and away you go.

    To import the contents of this SQL file, follow the same process, but instead of logging into the phpmyadmin for database2, log into the phpmyadmin for database1, and this time, click on the tab called SQL. Open the SQL file and copy/paste the contents of that SQL file into the textarea on that page.

    Click on go, and you should be ready to rock.

    Questions? Post up.

  3. abcdefgary
    Member
    Posted 7 years ago #

    thank you! I had to modify the text file a bit, but you led me to the right direction. thanks.

  4. DianeV
    Member
    Posted 7 years ago #

    That's most interesting, jkozuch.

    However, whenever I've done a database dump (which is essentially what you get with PHPmyadmin), the resulting .sql file contained instructions to *create* the tables -- and the only way I could get mysql to import the .sql file successfully was to drop the tables from the database first.

    Hm. I'm going to guess that this would not be a problem in the above scenario because the sql file would be creating *different* tables than the ones existing in the database.

    I'm not sure if that's a question. :)

  5. jkozuch
    Member
    Posted 7 years ago #

    Diane,

    That's one way of doing it... sometimes I go that route to make sure everything is gone.

    "Hm. I'm going to guess that this would not be a problem in the above scenario because the sql file would be creating *different* tables than the ones existing in the database."

    Shouldn't be. You'd want to do a comparison of the tables in both databases to make sure BEFORE you do the import. There is not Undo function when it comes to MySQL, oh, how I wish there was.

    - Justin

  6. DianeV
    Member
    Posted 7 years ago #

    > Undo function

    You're telling me! I wish there was, too. And thanks for the explanation.

Topic Closed

This topic has been closed to new replies.

About this Topic