MySQL Dump

Published on Christian Mayer's Weblog

All Databases

$ mysqldump -u USER -pPASSWORD -A > all.sql

Only database1

$ mysqldump -u USER -pPASSWORD database1 > database1.sql

Only table1 from database1

$ mysqldump -u USER -pPASSWORD database1 table1 > database1.table1.sql

Structure only from database1

$ mysqldump -d -u USER -pPASSWORD database1 > database1.struct.sql

Data only from database1

$ mysqldump -n -t -c -u USER -pPASSWORD database1 >

Notice that there is no space (“ “) between the -p and the PASSWORD.

Recent Posts

About the Author

Christian is a professional software developer living in Vienna, Austria. He loves coffee and is strongly addicted to music. In his spare time he writes open source software. He is known for developing automatic data processing systems on Debian Linux server.

Categories: Productivity
Tags: SQL, MySQL, Dump, Backup, MySQLDump, MySQLBackkup, MySQL Dump, MySQL Backup, Database, Table, HOWTO

Archive | Categories | RSS Feed | Usage | Imprint
Copyright © 2006 by