Importing Big Database

Discussion in 'MySQL' started by Sanma, May 25, 2008.

  1. #1
    Hello,

    I currently own a gaming website, and it's database has about 70mb.
    I'm changing to a VPS, so today i put the site under maintenance, uploaded the files to the new server, changed the DNS of the domain, and when i was uploading the database (Using PhpMyAdmin), everything looked fine until after like 1:20 hs, the window changed from the "uploading" status to the login page of plesk.
    So i though "It must've finished"... but no, i logged in, and the database was empty, so apparently it didn't work.
    Maybe because my internet connection isn't very good (640k) and a timeout occured?, idon't know.. but the thing is,
    Is there a different way to upload the database that it isn't phpmyadmin?, or using it but uploading by small pieces, so this doesn't happen again... something like that.

    I'd really appreciate different options, and as soon as possible, since i don't want to have my website offline for so long :S

    Thank you very much!



    Nick
     
    Sanma, May 25, 2008 IP
  2. Freewebspace

    Freewebspace Notable Member

    Messages:
    6,213
    Likes Received:
    370
    Best Answers:
    0
    Trophy Points:
    275
    #2


    Split the files and upload to database


    there are lot of file splitters available use them to split your database .xls or.txt files and then upload them .
     
    Freewebspace, May 25, 2008 IP
  3. Kuldeep1952

    Kuldeep1952 Active Member

    Messages:
    290
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    60
    #3
    You can use the bigdump script from www.ozerov.de/bigdump.php
    to overcome the problem of importing a large mysql database.
     
    Kuldeep1952, May 26, 2008 IP
  4. Greg-J

    Greg-J I humbly return to you.

    Messages:
    1,844
    Likes Received:
    153
    Best Answers:
    0
    Trophy Points:
    135
    #4
    I can attest to this script, it's awesome.

    If you have root though, stop mysqld and move the flat files, start mysqld. Nothing's quicker.
     
    Greg-J, May 27, 2008 IP
  5. FoxyGerty

    FoxyGerty Peon

    Messages:
    77
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I agree use bigdump it's the best
     
    FoxyGerty, May 27, 2008 IP
  6. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #6
    Why don't you upload the file via FTP and use MySQL's command line options to import the data?
    You can use either mysql or source command e.g.
    On shell
    shell> mysql database_name < database_dump.sql
    Code (markup):
    Or on mysql prompt
    mysql> USE database_name;
    mysql> source database_dump.sql;
    Code (mysq):
    Make sure you create a database first.

    You can still import the database using phpMyAdmin by increasing file upload limit.
     
    mwasif, May 27, 2008 IP