Some useful command lines:
backup: # mysqldump -h localhost -u root -p database_name > dumpfilename.sql
restore:# mysql -u root -p database_name < dumpfilename.sql
mysql -u root -p
mysql> create database `dev-001` default charset utf8;
mysql> drop database `dev-001`;
Backup and restore all databases:
mysqldump -u root -p --all-databases > backup.sql
mysql -u root -p < backup.sql