Transfer MySQL Database Server to Server Using cPanel

Hello Friends,

Few days ago I have project to transfer MySQL Database from one server to another. I don’t want to use my internet bandwidth for this large database by downloading to my local computer and then uploading this to another server. Rather I was thinking of transferring this by one server to another.

Below is the syntax to do that.

[In Mysql Bin Folder]>mysqldump -h[source-hostname-or-IP] -u[username] -p[password] [Database-name] | mysql -h[destination-hostname-or-IP] -u[username] -p[password] [target-Database-name]

Before Using this you have to setup few thing in you local machine.

  • Install MySQL
  • Open command prompt.
  • Locate “bin” directory in MySQL Installation in Command Prompt
  • Create Database in Destination or Target Server
  • Make Remote Connection allowed on both Destination and Source Server.
  • fire command with your own parameter.

Please feel free to ask any question.

Thank you.