Difference between revisions of "MySQL"

Jump to navigation Jump to search
331 bytes added ,  11:19, 15 January 2014
→‎Maintenance: Added "Export / Backup"
m (→‎Database Sizes: Added Top Tables)
(→‎Maintenance: Added "Export / Backup")
Line 286: Line 286:


Adapted from http://www.mysqlperformanceblog.com/2008/02/04/finding-out-largest-tables-on-mysql-server/
Adapted from http://www.mysqlperformanceblog.com/2008/02/04/finding-out-largest-tables-on-mysql-server/
=== Export / Backup ===
<source lang="mysql">
mysqldump -u root -p dbname > dbname.sql              # Basic dump
mysqldump -u root -p dbname | dbname.sql.gz          # Create a compressed dump
# Exclude certain tables
mysqldump -u root -p dbname --ignore-table=dbname.table1 --ignore-table=dbname.table2 > dbname.sql
</source>


=== Corruption ===
=== Corruption ===

Navigation menu