Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

populate all data from old database to a new one.

 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

here is the deal: I have installed a mySql db on my client server. He has asked for some improvments and that required me to add some new tables and columns to existing tables.

Question: is there any way to take all the data in his db and populate it into the new db?

Thanks
peter
 
Avi Abrami
Ranch Hand
Posts: 1141
1
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Peter,
I don't know mySQL, but perhaps it has some sort of INSERT...SELECT... statement? Most databases do. Alternatively, most databases have a utility to dump table data to some flat file, and another utility to load data into a table from a flat file. But then again, being mySQL, maybe it doesn't have any of those things. (You get what you pay for! )

Good Luck,
Avi.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
man mysqldump

http://dev.mysql.com/doc/mysql/en/mysqldump.html
[ April 12, 2005: Message edited by: Ben Souther ]
 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most databases do. Alternatively, most databases have a utility to dump table data to some flat file, and another utility to load data into a table from a flat file.

right but this produces the create and delete. the only thing i am intreseted is in INSERT

so if i have an old db it will produce insert statments.

any idea what the dump command should be?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic