While migrating an application or website from one LAMP server in to another , major headache is the DB migration, here is how we can simplify things so that your local bandwidth will be untouched and time of migration will be minimum as this is a server to server communication. Here we are bypassing following steps which are normally in practice
1. Download backups to local machine
3. Upload to Remote Server
4. Restore Data separately
]# mysqldump database_name > database_name.sql
This will consume some time based on the size of database , which we are backing up.
Now copy this file from Local server to remote server. Read this article to know how to do this., When this file get copied to the remote server, go to next step.
]# mysql –u username –p database_tobe_restored < backupfile.sql
This will prompt for password and upon submitting password there will be a cursor blinking with out any response text , and the time of wait is directly proportional to the size of file to be restored., wait until it finishes and check your restored database.