MySQL: database backup, compression and restore

The easier and quicker way to backup a database is using mysqldump command.

The syntax is as follows:

backup:

mysqldump –u [uname] –p [pass] [dbname] > [backupfile.sql]

restore:

mysql –u [uname] –p [pass] [dbname] < [backupfile.sql]

Continue reading “MySQL: database backup, compression and restore”