Archive for June, 2010
Backup & Restore mySQL database | quick guide
Create a backup: mysqldump -u username -p password –databases database1 database2 db_name3 > multi_db_names.sql mysqldump –all-databases > alldatabases.sql mysqldump –all-databases | bzip2 -c > databasebackup.sql.bz2 mysqldump –all-databases | gzip > databasebackup.sql.gz Restore from a backup: mysql -u [username] -p [password] [database_to_restore] < [backupfile] gunzip < backup_name.sql.gz | mysql -u username -p password db_name If you […]