$ mysqldump --databases -u root -p name > name.sqlwhere
name is the name of the database to save the data into, and name.sql is a file which contains the information in the database.
$ mysql -u root -p mysql> source name.sql;This overwrites any changes in the database which happened after it was saved to
name.sql.