Transferring all MySQL/MariaDB databases

This command will export everything…

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

This command will import everything (and overwrite old stuff)…

mysql -u root -p < everything.sql

 

Leave a Comment