Well you can use below command to export,
mysqldump --databases --user=root --password your_db_name > export_into_db.sql
and the generated file will be available in the same directory where you had ran this command.
Now login to mysql using command,
mysql -u[username] -p
then use "source" command with the file path.