Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2003
    Posts
    28

    Unanswered: How to export a mysql database from a java application?

    Hello!

    Is there a way to export a database and all its tables from a java application?

    If yes, how does the syntax looks like?

    Regards // D_S

  2. #2
    Join Date
    Jan 2003
    Location
    Paris, France
    Posts
    320
    You can use SELECT OUTFILE syntaxe

    SELECT col INTO OUTFILE "/pathto/result.text"
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    LINES TERMINATED BY "\n"
    FROM table WHERE ....;
    Olivier Miossec
    --
    http://www.lasso-developpeur.net/
    --

  3. #3
    Join Date
    Dec 2003
    Posts
    28
    Hello,

    Thank you for your answer...but.

    I'm a newbie of mysql but your syntax doesn't I select every column, and saving the information to a textfile, or? That means I have to read all my tables and save the information to different textfiles, or am I wrong?

    I want to package all my tables ifrom my database " division" and export it like a *.SQL-file like I do from the "c:/mysql/bin-promt" where I export my hole database:

    mysqldump -u username -ppassword database_name > FILE.sql

    Regards // D_S

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •