Check out example codes for "mysql dump database command line linux". It will help you in understanding the concepts better.

Code Example 1

mysqldump -u<user_name> -p<user_password> <database_name> > <file_name>.sql

Code Example 2

mysql -u<user_name> -puser_password> <database_name>
source /path/db.sql

Learn ReactJs, React Native from akashmittal.com