permaculture playing cards*
The moose likes Other Open Source Projects and the fly likes export database in mysql Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "export database in mysql " Watch "export database in mysql " New topic
Author

export database in mysql

vijayakumar durai
Ranch Hand

Joined: Aug 18, 2008
Posts: 153
can anybody tell how to export database in mysql?
Fatih Keles
Ranch Hand

Joined: Sep 01, 2005
Posts: 182
This is from mysql reference : http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html

Regards,

Fatih.

vijayakumar durai
Ranch Hand

Joined: Aug 18, 2008
Posts: 153
can i able to export database from mysql command line client
Fatih Keles
Ranch Hand

Joined: Sep 01, 2005
Posts: 182
I used below script to export many times

to import


But the previous post has already leads to these scripts. You should show some efford.

Regards,

Fatih.
Samuel Behrman
Ranch Hand

Joined: Oct 02, 2009
Posts: 49
This example shows you how to export a database. It is a good idea to export your data often as a backup.
# mysqldump -u username -ppassword database_name > FILE.sql
Replace username, password and database_name with your MySQL username, password and database name.
File FILE.sql now holds a backup of your database, download it to your computer.


RAQ Report: Web-based Excel-like Java reporting tool.
vijayakumar durai
Ranch Hand

Joined: Aug 18, 2008
Posts: 153
i used below command but it show error



mysql>mysqldump -u root -p root library>File.txt


but it gives error
Fatih Keles
Ranch Hand

Joined: Sep 01, 2005
Posts: 182
Fatih Keles wrote:



mysqldump is NOT a command in mysql it is a distinct executable which can be found under the same folder where mysql executable is.
Why don't you just use what I have said?

Just use the below in COMMAND LINE not in MYSQL


If it returns error what is the error message? Please post it.

Regards,

Fatih.
vijayakumar durai
Ranch Hand

Joined: Aug 18, 2008
Posts: 153
error 1064 (42000) you have error in sql syntax check the manual correspond to your mysql server version for righ syntax near 'mysqldump -u root -p root library>File.txt

library is database name i am not using linux
Fatih Keles
Ranch Hand

Joined: Sep 01, 2005
Posts: 182
vijayakumar durai wrote:error 1064 (42000) you have error in sql syntax check the manual correspond to your mysql server version for righ syntax near 'mysqldump -u root -p root library>File.txt


It seems to me that you have executed the command in mysql again. Please do not, just use mysqldump.exe if it is Windows host.

Regards,

Fatih.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: export database in mysql
 
Similar Threads
How to restore mysql backup using java swing
plzzzzzzzz help me
using a mysql db on web.
mysql
Java MySQL MS Excel