• 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 database in mysql

 
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can anybody tell how to export database in mysql?
 
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
We begin by testing your absorbancy by exposing you to 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