Oneliner for migrating mysql databases from one host to another

mysqldump --lock-all-tables -u root --all-databases | ssh remoteuser@remotehost mysql -u root

Leave a Reply

Your email address will not be published. Required fields are marked *