when i setup a remote mysql server..

allenhui

Well-Known Member
Aug 17, 2003
105
0
166
When i setup a remote mysql server for doing the database job,how can i transfer all the mysql in the cpanel account to the sql server? Have anyone try it?
 

vishal

Well-Known Member
Jan 28, 2003
339
0
166
India
Originally posted by allenhui
When i setup a remote mysql server for doing the database job,how can i transfer all the mysql in the cpanel account to the sql server? Have anyone try it?
1. Stop Mysql or HTTPd on your server (So that the mysql database wont update when the transfer is going on)
2. create the database on the remote server with the same username and passwd as it is on your server.
3. take a dump of your database using mysqldump
4. ftp the sql file to remote server
5. restore the database on the remote server.

Reference :
=============

Take backup of current mysql database
======================================
mysqldump --user=username --password=password databasename > filename.sql

Ftp the .sql file to the other server.

To Restore the Mysql file in mysql database
===========================================
mysql -uUsername -pPassword databasename < filename.sql

You may need root access or SSH atleast.

Hope this helps !