MySQL‎ > ‎

Export/Import

For MySQL Export and Import (backup and restore), or migration/dump Examples to dump database wordpress:

mysqldump --opt wordpress > wordpress.sql

dump a table

mysqldump --opt DBName TableName > TableName.sql


after creating wordpress_dev database we can import the dump of wordpress to wordpress_dev database by running the following

mysql wordpress_dev < wordpress.sql

Mysql full dump

mysqldump --all-databases > mysqlbak.dmp

MySQL dump with compression

mysqldump --all-databases | gzip > database.sql.gz

dump of userinterface.profiles in a way that will just merge the new rows when imported

mysqldump --skip-add-drop-table --insert-ignore --no-create-db --no-create-info -p userinterface profiles > userinterface.profiles.sql
Comments