aspose file tools*
The moose likes JDBC and the fly likes moving your tables+content to another MySql server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "moving your tables+content to another MySql server" Watch "moving your tables+content to another MySql server" New topic
Author

moving your tables+content to another MySql server

Peter Primrose
Ranch Hand

Joined: Sep 10, 2004
Posts: 755
Say I have created some tables (call it
myDB) and it is staffed with some info. I want to
send myDB to a different server with mySQL What should I send?

I tried sending the:
Program Files/MySQL/MYSQL server 4.1/ data/myDB
but for some reason not all tables are passed???

does anyone know what is the best way to send your tables+content in mySql to a different computer with mySql?

thanks
Ppr
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

You could use mysqldump. This dumps the DDL plus the data.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Peter Primrose
Ranch Hand

Joined: Sep 10, 2004
Posts: 755
the mysqlsump is a command-line utility. I would like my clients (not computer savvy) to duplicate the db for backup and to send it to me from time to time.

Q: Is there a less command-line more visualize way to do it?
thanks
Horatio Westock
Ranch Hand

Joined: Feb 23, 2005
Posts: 221
The first thing that comes into my head is use the cron (or windows task scheduler etc.) to run the dump utility, then just get them to send you the output from wherever you tell it to put it.
[ March 08, 2005: Message edited by: Horatio Westock ]
Peter Primrose
Ranch Hand

Joined: Sep 10, 2004
Posts: 755
I realized that the tables are located at
C:\Program Files\MySQL\MySQL Server 4.1\data

(first thing I did is to zip myDB and unzip it at the other end, but it doesnt work - it does work with MS Access)

so say I have a table name: myDB, how can I export it and how can the other side Import it?

does anyone have any java code that runs the mySqlDump utility?
Ppr
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: moving your tables+content to another MySql server