Home Databases mySql How to export a mySql database to a file via the Command Line in Linux?
 
 
 

How to export a mySql database to a file via the Command Line in Linux?

PDF Print E-mail

Question: How to export a mySql database to a file via the Command Line in Linux?

 

Answer:

  • Open a new Terminal Window
  • Type in the following command
    mysqldump -uUsername -pPassword DatabaseName > outputFile.sql
    
  • The command above will export a selected database to a file called outputFile.sql
    • mysqldump = a database backup program
    • -u = Username for the database
    • -p = Password for the database
    • DatabaseName = The database name you wish to export
+/-
+/- Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:angry::0:confused::cheer:B):evil::silly::dry::lol::kiss::D:pinch:
:(:shock::X:side::):P:unsure::woohoo::huh::whistle:;):s
:!::?::idea::arrow:
Security Please input the anti-spam code that you can read in the image.
 

Go Daddy $7.49 .com Sale!