Need Help - cPanel mysql database import

Discussion in 'MySQL' started by Shazz, Sep 7, 2008.

  1. #1
    I backed up this mysql database through cpanel and saved it on my hard drive.
    Now Im reimporting back in cpanel and it takes me to a white page that says "Restoring Database" then has all the scripts below that.

    After its done, I check the size of the database through cPanel by clicking on mysqldatabases and it says its 35mb when the original size was 66mb

    I have reimported it many times and I got as high as 55mb. Everytime I import it I get a different size.

    What is the problem? :eek:
     
    Shazz, Sep 7, 2008 IP
  2. Radz

    Radz Notable Member

    Messages:
    1,497
    Likes Received:
    304
    Best Answers:
    0
    Trophy Points:
    280
    #2
    i guess The problem is with your internet connection... its not uploading database correctly in one instance. Try to upload from a high bandwidth net connection.
     
    Radz, Sep 7, 2008 IP
  3. Shazz

    Shazz Prominent Member

    Messages:
    8,395
    Likes Received:
    453
    Best Answers:
    0
    Trophy Points:
    330
    #3
    Anymore gueses?
     
    Shazz, Sep 7, 2008 IP
  4. wisdomtool

    wisdomtool Moderator Staff

    Messages:
    15,825
    Likes Received:
    1,367
    Best Answers:
    1
    Trophy Points:
    455
    #4
    The size of the database change radically? :)

     
    wisdomtool, Sep 7, 2008 IP
  5. Shazz

    Shazz Prominent Member

    Messages:
    8,395
    Likes Received:
    453
    Best Answers:
    0
    Trophy Points:
    330
    #5
    I already stated that :confused:
     
    Shazz, Sep 7, 2008 IP
  6. nyxano

    nyxano Peon

    Messages:
    417
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #6
    My guess is that the script that runs to import the database file is timing out and what you see is what got done before it times out. Hence why one time it is 35MB and another time 55MB (or other varying numbers).

    Importing a database that size in one chunck almost never works. MySQL Database File you saved on your hard drive should be a Plain Text file that you can open in Notepad or similar text editor.

    My advice would be to split the file into at least three different pieces, maybe more. There are lots of lines in the file that have nothing on them (ie: link the spaces between my paragraphs) and you can generally break the file up at any one of them.

    Usually the Database Text file is in a format such as CREATE table, followed by INSERT, INSERT, INSERT. Keep the CREATE and INSERT together for each table to make it easier (but it is not necessary).

    When the import is processing, it reads the Database File one line at a time and executes that command. That's why you always see a partial database... because so many commands got executed before the script timed out (or gave up).
     
    nyxano, Sep 7, 2008 IP