• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

populate all data from old database to a new one.

 
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1143
1
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
reply
    Bookmark Topic Watch Topic
  • New Topic