Linux/Mysql: Difference between revisions
< Linux
No edit summary |
|||
Line 14: | Line 14: | ||
== Dump Database == | == Dump Database == | ||
<pre> | |||
mysqldump -u root -p databasename > databasename.sql | |||
mysqldump -u root -p --quick --add-drop-table --complete-insert --allow-keywords databasename > databasename.sql | |||
</pre> | |||
[[Category:Linux]] | [[Category:Linux]] | ||
[[Category:Linux/Services]] | [[Category:Linux/Services]] |
Revision as of 06:20, 13 March 2019
List Databases
mysql -u root -p show databases; or mysql -u root -p -e 'show databases;'
Dump Database
mysqldump -u root -p databasename > databasename.sql mysqldump -u root -p --quick --add-drop-table --complete-insert --allow-keywords databasename > databasename.sql