export all database mysql code example
Example 1: export all databases mysql
# Export
mysqldump -u root -p --all-databases > all.sql
Example 2: export database mysql
mysqldump -u [username] -p [database-you-want-to-dump] > [path-to-place-data-dump]
Example 3: import all databases mysql
# Import
mysql -u root -p < all.sql