MYSQL
On this page 2 sections
MYSQL Cheatsheet.
MYSQL DUMP
Mysql Dump will give you a copy of the entire database in a sql document. Which is a form of backup, because the dump file is in a format that can be importet back into a mysql database.
See below the format required and an example.
mysqldump -u [user name] -p [database name] > [dump file]
mysqldump -u fullmetal -p fullmetal-db > fullmetal-db.sql
To restore from a sql dump file do the following.
mysql -p -u[user] [database] < db_backup.dump
mysql -u fullmetal -p fullmetal-db < fullmetal-db.sql
If the dump contains multiple databases you should omit the database name:
mysql -p -u[user] < db_backup.dump