Check out example codes for "import all databases mysql". It will help you in understanding the concepts better.

Code Example 1

# Export
 mysqldump -u root -p --all-databases > all.sql

Code Example 2

# Import
mysql -u root -p < all.sql

Learn ReactJs, React Native from akashmittal.com