Backing up and restoring MySQL database is generally trivial task however when database is huge, it is really a pain to do so because of amount of time it takes to perform backup/restore operation with conventional tools like PHPMyAdmin or similar.
To Backup Database:
mysqldump -uDB_USER_HERE -pDB_PASSWORD_HERE DATABASE_NAME_HERE > backup.sql
To Restore Database:
mysql -uDB_USER_HERE -pDB_PASSWORD_HERE DATABASE_NAME_HERE < backup.sql
Note: If you don't have SSH access, you can use tools like MySQLDumper which does fairly good job but not as fast as
mysql commands of course.