Copy MySQL Database

#!/bin/bash
 
mysqldump --host=${DB_FROM_HOST} --user=${DB_FROM_USER} --password=${DB_FROM_PASS} ${DB_FROM_NAME} | \
mysql --host=${DB_TO_HOST} --user=${DB_TO_USER} --password=${DB_TO_PASS} ${DB_TO_NAME}

Do you like this page? Then support it. Please click the AD below and visit the sponsor. Thank you!