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.

Move a database from one account to another

Discussion in 'Database Discussions' started by Abbas, Oct 26, 2008.

  1. Abbas

    Abbas Member

    Joined:
    Dec 12, 2002
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    We've shifted our forums from one domain to another and thus I need to move the forums database from account1 to account2. What would be the easiest/fastest way to accomplish this?

    Thanks
     
  2. JawadArshad

    JawadArshad Well-Known Member
    PartnerNOC

    Joined:
    Apr 8, 2008
    Messages:
    447
    Likes Received:
    4
    Trophy Points:
    18
    Location:
    PK
    cPanel Access Level:
    DataCenter Provider
    - You can download your databases via cPanel >> Backups and restore them on the destination.

    - You can create dumps of databases on the source server, transfer them over to the destination server and restore them. Here are the steps.

    Login via SSH

    1- go to /var/lib/mysql
    2- mysqldump dbname > dbname.sql
    This will create the database dump
    3- scp dbname.sql root@hostname:/var/lib/mysql
    4- Create empty database on destination using command.
    mysqladmin create dbname
    5- mysql dbname < dbname.sql
    to restore the database dump

    Make sure the version of MySQL are same on both sides and you know your way around Linux. If you do not have root access, simply download the database dumps from cPanel >> Backups, upload them on the destination and ask your host to restore them.
     
    #2 JawadArshad, Oct 29, 2008
    Last edited: Oct 29, 2008
Loading...

Share This Page