Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Merge Databases?


Recommended Posts


About a month ago I started work to move my live site to a new domain name.


The migration of the site went without any problems but I decided that it was a great opportunity to do a little work to the site and add some contributions - some of which required additional tables to be created in the database. All this time the old site was left as the live working site and the new one was password protected to stop anyone else having access. I was hoping to do it all in a day.


Unfortunately, other commitments prevented me from finishing the task. I have now revisited the work and completed it BUT of course the database on the old live site has moved on.


Obviously I cant restored the old sites database since the new one has additional tables.


I was wondering if it is possible to merge the database so I have all the data of the old working site but preserve the new structure that is required for the new site. How can this be done?



Link to comment
Share on other sites

do you have access to a machine running perl?


If so and you know a bit about linux (pref) look in the catalog dir and there is a mysqldiff folder.


That program will give you the differences between the 2 databases and will supply sql scripts to make the 1st database identical to the second.

Mark Evans

osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops)



Software is like sex: It's better when it's free. (Linus Torvalds)

Link to comment
Share on other sites

It all goes back to the way you structured your databases..


Lets say that you had Table 1 , section A,B,C


You then made Table 1, with Sections A,B,C,D = You will have to only copy D to the old one.


Lets say that you had Table 1, Section A,B,C


You then made Table 1 , with Section A - New Table , New Table1 ,B,C,D = You will have to only copy the new rows New Table , New Table1 to Section A and Copy Section D.


"Section = Table"


Let's say that You used the same table for two things, if the rows and tables would not conflict with each other, then it should go fine..


HowTo Do This: (using PHPMYADMIN)


Select BackUp to the tables,rows you need to update and then combile them to a sql or txt file..


Using PHPMYADMIN on the Live server, all you have to do is Select All of the Fileds to update and enter them using an SQL query..


Hope it helps




Link to comment
Share on other sites

If you do not have telnet access to the server, how can you run MYSQLDIFF?


I am copying an old oscommerce database's content to the 2.2 version - can someone give me the step-by-step to doing this?


MUCH appreciated! :)

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...