The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

when i setup a remote mysql server..

Discussion in 'General Discussion' started by allenhui, Dec 26, 2003.

  1. allenhui

    allenhui Well-Known Member

    Joined:
    Aug 17, 2003
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    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?
     
  2. vishal

    vishal Well-Known Member

    Joined:
    Jan 28, 2003
    Messages:
    340
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    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 !
     
  3. allenhui

    allenhui Well-Known Member

    Joined:
    Aug 17, 2003
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
Loading...

Share This Page