skip to Main Content

I have two versions of the same website (one live on shared hosting and the other on a VPS to take its place).

The current live site has a more up to date MySQL database (for example it has 610 users as opposed 520 on the VPS).

I need to export the live site database and import it to the VPS site to reconcile the difference before making the VPS live.

Both sites database have the same name b_wp566.

I am confused as to how to do that in cPanel. If I export the database and then import it to the VPS I will have two versions of the same database.

Do I have to delete one version first or is there an update type option?

2

Answers


  1. From CPanel, start PhpMyAdmin and from there find the database you want and export it. Save the database dump on your machine, then import it on the second server.

    You probably want to drop the database that’s on the 2nd server. The script that you exported should re-create it. It’s a text file, check if it has a line create database b_wp566

    Merging the two databases could be done but is more difficult.

    Here is a video tutorial I found online: http://support.hostgator.com/articles/exporting-a-mysql-database-via-phpmyadmin

    Login or Signup to reply.
  2. i am not sure what you want to do, but try this ,it might work for you

    UPDATE vps_database.dbo.b_wp566
    SET vps_column1 = live_b_wp566.column1
    SET vps_column2 = live_b_wp566.column2
    .                            .
    .                            .
    .                            .
    FROM live_database.dbo.b_wp566
    WHERE
      live_database.dbo.b_wp566.b_wp566_ID != vps_database.dbo.b_wp566.b_wp566_ID
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search