Copy mySQl table for Godaddy to another server

Discussion in 'PHP' started by macdesign, Sep 29, 2005.

  1. #1
    I have a very large mySQL database stored on Godaddy and linked to a site there. I need to move the tables to another host.

    The tables are large enough that using export to a text file and then uploading again is very unwieldy, it keeps timing out.

    It seems I could write a PHP script that would simultaneuosly connect to the two different hosts and do a copy might be easier.

    Godaddy keep all their mYSQL database on another domain SECURESERVER.NET

    I tried this - which works when run from Godaddy

    echo 'trace1';
    $host="mysql.secureserver.net";
    $user="****";
    $password="****";
    $database="****";

    $linkgodaddy=mysql_connect($host,$user,$password);
    echo 'trace2';
    mysql_select_db($database);
    echo 'trace3';

    but when run from my new host - it only gets to trace1

    Is there way way round this, or is access to mysql.secureserver.net blocked unless the script is running from my Godaddy site?
     
    macdesign, Sep 29, 2005 IP
  2. bamb0lin

    bamb0lin Well-Known Member

    Messages:
    401
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    108
    #2
    export the database using phpmyadmin and import it at your new hosting company
     
    bamb0lin, Sep 30, 2005 IP
  3. macdesign

    macdesign Peon

    Messages:
    568
    Likes Received:
    59
    Best Answers:
    0
    Trophy Points:
    0
    #3
    PHPmyAdmin - That's what I was doing and it did not work.

    Someone pointed me to this // http://wiki.i40.com/MigratingmySQL

    and I managed to get it done using the advice there - however note well that site has several mistakes [mostly in inconsistent upper/lower case] in the PHP code that need fixing.

    I used a modifed version of the three step process that created a very large file that I then downloaded and uploaded back to the new host with ftp.
     
    macdesign, Sep 30, 2005 IP
  4. netaddict

    netaddict Peon

    Messages:
    640
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #4
    That's exactly what I did yesterday :D (even, someone referred me to the same URL too) :rolleyes:
     
    netaddict, Sep 30, 2005 IP