Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

export database in mysql

 
vijayakumar durai
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can anybody tell how to export database in mysql?
 
Fatih Keles
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is from mysql reference : http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html

Regards,

Fatih.

 
vijayakumar durai
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can i able to export database from mysql command line client
 
Fatih Keles
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
vijayakumar durai
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic