Moving mysql database between servers using one line command

Useful article here on moving a mysql database between servers using SSH and just a single line of code, in a nutshell…

mysqldump -u username -p password database | ssh username@servername 'cat - | mysql -u username -p password database'

Leave a Reply

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