my sql export all db to sql code example
Example 1: export all databases mysql
# Export
mysqldump -u root -p --all-databases > all.sql
Example 2: import all databases mysql
# Import
mysql -u root -p < all.sql
# Export
mysqldump -u root -p --all-databases > all.sql
# Import
mysql -u root -p < all.sql