Check out example codes for "mysql dump mysql db cli". It will help you in understanding the concepts better.

Code Example 1

mysqldump -u username -p dbname > filename.sql

Code Example 2

#note by specifying -p flag without a password it'll prompt you for pass

DUMP:
mysqldump -u username -p dbname --lock-tables=false > filename.sql

Import:
mysql -u username -p dbname < filename.sql

Import external:
mysql -h host -u username -p dbname < filename.sql

Code Example 3

mysql -u username -p dbname < filename.sql

Learn ReactJs, React Native from akashmittal.com