Check out example codes for "mysqldump". It will help you in understanding the concepts better.

Code Example 1

mysqldump -u username -p dbname > filename.sql

Code Example 2

# Syntax
mysqldump -u [username] -p [database-to-dump] > [database-to-receive]

# Pipe it! Exporting DB from external host
mysqldump -u [username] -P [port] -h [host] [database-to-dump] | mysql -u root -h [database-to-receive]

# Limit the export/dump to a sepcific table by typing its name after the DB

Code Example 3

mysqldump -u <user> -p <database> | bzip2 -c > <backup>$(date +%Y-%m-%d-%H.%M.%S).sql.bz2

Code Example 4

mysql -u username -p dbname < filename.sql

Learn ReactJs, React Native from