Export full database

 

To export database, use the following command. (where username is database user)

Enter the password when prompted

mysqldump -uUSERNAME -p USER_DATABASE > FILENAME.sql

 

Then import using:

mysql -uUSERNAME -p USER_DATABASE < FILENAME.sql

 

Export /dump particular table from a database 

 

For exporting particular tables from a database, following command is used :

mysqldump -uUSERNAME -p USER_DATABASE table1 table2 ... tabllen > FILENAME.sql

 

這篇文章有幫助嗎? 0 Users Found This Useful (0 Votes)