dump a database into file using mysqldump
<dbname> with your specific values:
mysqldump -u <username> -p<password> <dbname> > /tmp/dump.sql
use a dump created by mysqldump to populate a database
The dump created in the last step is just a series of sql statements that can be used to populate a database. If the dump has been created at
/tmp/dump.sql, then we should do the following:
Log in to mysql. Replace
<password> with your own.
mysql -u <username> -p<password>
once inside the mysql cli interface, select a database. Replace
<dbname> with your database name.
then load the dump file into this database: