how to dump all databases code example
Example 1: export all databases mysql
# Export
mysqldump -u root -p --all-databases > all.sql
Example 2: database dump mysql command
mysql -u username -p dbname < filename.sql
# Export
mysqldump -u root -p --all-databases > all.sql
mysql -u username -p dbname < filename.sql