• 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

Export data from database

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I am just writing a small application that takes the back up of the mysql database and write in a file in any format (most probably in the .txt format)

After taking the backup , i want to retrive the data from that file and export the data in the mysql database

If please someone suggest how to a write this application in a good and optimized way .
More over if some one suggest some open free source so that i will get good idea....

Thanks in advance ...

Maneesh Chauhan
 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Firstly i just did not understand your question very much...

1- you want to take a back up of mysql db and later you wanna insert all into db right?

2- My sql is storing db as files somewhere in its folders.
If your aim is only for back up then why don't you copy the files to somewhere and later copy the files to the mysql's folder that it uses from, as db? I mean manually...

As i said i had a couple questions, I was not sure about what you mentioned exactually.

If in any case you wanna store the datas to files (programatically) and later you wanna insert them into mysql again,

You can use serialization.

You create a javabean which will hold the data .
you persist data with that java bean into disc.
And you can retrieve it later too.

gl
[ September 23, 2006: Message edited by: sinasi susam ]
 
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Take a look at the mysql client utilities mysqlhotcopy and mysqldump.
 
Uh oh, we're definitely being carded. Here, show him this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic