when i try to import huge table(using ssh) the server stop responding

Discussion in 'MySQL' started by arambo, Mar 30, 2009.

  1. #1
    when i try to import huge table(using ssh) the server stop responding

    this is the command i use

    mysql -uusername -ppassword databasename < tablename.sql

    but if the file is big the server stops responding so i wait for hlaf an hour restart the server but when i turn it on and see what has been imported i see that 1/3 of the table was imported
    so how can i fix this ?
    i have 4gb ram and quad core xeon 3210 - centos 5

    i posted this in php fourm also ( i did this becuase i need an answear as fast as possible)

    thanks
     
    arambo, Mar 30, 2009 IP
  2. crivion

    crivion Notable Member

    Messages:
    1,669
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    210
    Digital Goods:
    3
    #2
    be patient? let it run for 2 hours then recome or you may use bigdump.php which has progress bar
     
    crivion, Mar 31, 2009 IP
  3. arambo

    arambo Peon

    Messages:
    218
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks i am using bigdump now thanks
     
    arambo, Mar 31, 2009 IP
  4. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #4
    You need to tune MySQL configuration file a little bit if the table type is MyISAM. Increas myisam_sort_buffer_size value a bit like
    myisam_sort_buffer_size=256M
    Code (markup):
    Restart the server after making this change and import the table. You need to be patient as crivion said.
     
    mwasif, Apr 4, 2009 IP
  5. arambo

    arambo Peon

    Messages:
    218
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    i did that and it worked thanks
    realy thanks
     
    arambo, Apr 5, 2009 IP
  6. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #6
    You are welcome.
     
    mwasif, Apr 5, 2009 IP
  7. cobilass

    cobilass Peon

    Messages:
    52
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    i did that and it worked thanks
    realy thanks
     
    cobilass, Apr 5, 2009 IP
  8. T.Guru

    T.Guru Peon

    Messages:
    78
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    To import some files to your database, you could use an ETL program. It is an Extract, transform and load application. It will allow you to upload files to your ftp and perform other types of operation - data synchronisation, data migration... There are many ETL tools you can use. Talend open studio is what you would need.
    It is downloadable from the website: http://www.talend.com/download.php
     
    T.Guru, Apr 6, 2009 IP