1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

MySQL client ran out of memory

Discussion in 'MySQL' started by siraxi, Jun 20, 2007.

  1. #1
    Hi

    While trying to backup a quite big vBulletin forum database - probably around 250 MB, on a virtual private server, it stopped and gave me this error:
    MySQL Error : MySQL client ran out of memory
    Error Number : 2008

    Could someone please suggest what to do to have the big database backed up? Thank you.
     
    siraxi, Jun 20, 2007 IP
  2. zonzon

    zonzon Peon

    Messages:
    100
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    check your php memory settings! some parameters define the RAM allowed for each scripts at execution time.

    Check for this one:
    memory_limit = 60M ; Maximum amount of memory a script may consume
     
    zonzon, Jun 20, 2007 IP
  3. andre75

    andre75 Peon

    Messages:
    1,203
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Don't backup and restore large databases through web interfaces.
    Open a shell and type (replace username, password, database_name, filename):
    mysqldump --opt --no-create-db --user=username --password=password database_name > filename.sql
    Code (markup):
    andre restore via:
    
    mysql --user=username --password=password database_name < filename.sql
    Code (markup):
    Its lightning fast. You can put that in your crontab and it won't create any of those problems.
     
    andre75, Jun 20, 2007 IP
    siraxi likes this.
  4. EGS

    EGS Notable Member

    Messages:
    6,078
    Likes Received:
    438
    Best Answers:
    0
    Trophy Points:
    290
    #4
    Ditto. Shell is the best way for uploading/downloading large MySQL database files, and won't put all the strain on your server/VPS.
     
    EGS, Jun 20, 2007 IP
  5. siraxi

    siraxi Peon

    Messages:
    333
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Many thanks pals ! I followed your advice and it went smooth and fine.
     
    siraxi, Jun 20, 2007 IP