Export and Import all MySQL databases at one time


Export:

mysqldump -u root -p --all-databases > alldb.sql

Look up the documentation for mysqldump. You may want to use some of the options mentioned in comments:

mysqldump -u root -p --opt --all-databases > alldb.sql
mysqldump -u root -p --all-databases --skip-lock-tables > alldb.sql

Import:

mysql -u root -p < alldb.sql


Ref:
https://stackoverflow.com/questions/9497869/export-and-import-all-mysql-databases-at-one-time


Article ID: 112
Created On: Fri, Mar 18, 2022 at 10:08 PM
Last Updated On: Fri, Mar 18, 2022 at 10:08 PM
Authored by: Saeed Nobakht [[email protected]]

Online URL: https://www.navel.ir/article/export-and-import-all-mysql-databases-at-one-time-112.html