Export
To export a MySQL database, enter:
mysqldump -u database_user database_name -p > dump.sql
where database_user is the name of a user with access to a MySQL database of the name database_name, and press Enter. mysqldump prompts for the password configured for that database. The contents of the database are written to dump.sql in the directory where the command is run.