Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2006

    Exclamation Move DB to new host

    I am using MYSQL as Website DB.I want to change my hosting company therefore I need to move my files and DB. My problem is that the DB size is about 800 MB. I don't know how to Move DB to new host?
    Should I first move DB to my Computer and then upload to new host. Is there any fast and secure method for this purpose.

  2. #2
    Join Date
    Jun 2005
    Sydney, Australia
    Old Server
    1. Backup your DB (mysqldump)
    2. compress it (zip/tar)
    3. move it to any downloadable folder of your website, maybe within the public_html
    New Server
    4. login to your new server
    5. on the shell type "lwp-download -a"
    6. It will download from your old server to your new server. saves you time and hassle and bandwidth.

    Hope that helps!

    <<Please see rules for signature setup>>

  3. #3
    Join Date
    Aug 2003
    Richmond, BC
    Good Morning,

    With either account do you have SSH access, or to you purely have access via ftp/cp/etc. The best way to transfer your database really depends on that.

    If you already have the new account and have SSH access on both accounts:

    1) Old Host
    i) mysqldump -uUSERNAME -p DBNAME > DBNAME
    ii) gzip -9 DBNAME (Optional)
    iii) Ftp to your new host and upload the compressed(or uncompressed file)
    2) New Host
    i) gzip -d DBNAME.gz (If you chose to compress it)
    ii) mysql -uUSERNAME -p DBNAME < DBNAME

    If you do not have SSH(Shell) access, then your best options are either to request your hosting provider render assistance, or investigate if they provide access to a web-based tool such as phpMyAdmin which will allow you to you do a mysqldump and download the resulting file.

    - Rory

  4. #4
    If MySQL version is the same on both machines, than you can simply move your database files completely (/var/db/db_name).

  5. #5
    Join Date
    Jan 2006
    thanks for your replies

  6. #6
    Join Date
    Dec 2004
    I would advise that you ask your new host. It is likely you are moving from cpanel to cpanel, or plesk to plesk... and your new host most likely has automatic tools to move. 800Mb is not so big for a server to server transfer, if he is willing to get your account he will surely do it for you.

    ComfortHost.NET. Top quality hosting. And a personal touch.
    ** web hosting ** reseller hosting ** VPS ** Managed Servers **

  7. #7
    Join Date
    Mar 2003
    New York City

    The best way would be to create a backup of your mysql database via your old host and it should be located in your /home/user directory if it's a cpanel server for the full backup. Then move the backup into public_html folder and set it to correct permission and just send the info/url to your new host so they get download it directly to their server and restore you from there

    CirtexHosting Providing Affordable and Quality Web Hosting & Reseller Hosting since 2003
    LINUX based cPANEL/WHM Shared and Reseller Web Hosting with Fantastico
    HostV VPS Premium Virtual Private Servers & Dedicated Servers powered by cPanel/WHM
    We transfer your sites over quickly! I eat penguins for breakfast ...

  8. #8
    Join Date
    Nov 2005
    DB size is about 800 MB
    in to shared server ??

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts