MySQL

Copying MySQL database to another server

* Export database from old server:

mysqldump -u[username] -p[password] db_name > db_backup

* Copy backup to new server:

scp db_backup [username]@[ip_address_or_hostname]:/home/[username]/db_backup

* Import database to new server:

mysql -u [username] -p -h localhost db_name < db_backup