The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MySQL server has gone away

Discussion in 'General Discussion' started by fog, Nov 1, 2002.

  1. fog

    fog Well-Known Member

    Joined:
    Jun 22, 2002
    Messages:
    164
    Likes Received:
    0
    Trophy Points:
    16
    This error pops up when trying to restore a database from the command line. Smaller databases work fine, but this one is very large... please help.
     
  2. Nadeem

    Nadeem Member

    Joined:
    May 1, 2002
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    h had the same proplem before..

    i found a fix for this in vbulltin.com forum go there ans search for &MySQL server has gone away& and you will find the answer.
     
  3. andyf

    andyf Well-Known Member

    Joined:
    Jan 7, 2002
    Messages:
    246
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    UK
    In your my.cnf and also on the command line for mysql, try changing this:

    set-variable = max_allowed_packet=&something larger than your insert&

    Andy.
     
  4. fog

    fog Well-Known Member

    Joined:
    Jun 22, 2002
    Messages:
    164
    Likes Received:
    0
    Trophy Points:
    16
    The my.cnf on my machine has only one line and it is max connections and is set to 500.
     
  5. fog

    fog Well-Known Member

    Joined:
    Jun 22, 2002
    Messages:
    164
    Likes Received:
    0
    Trophy Points:
    16
    Could someone please post an example.. I added a line ...

    set-variable = max_allowed_packet=512MB

    to /etc/my.cnf and also to another my.cnf that had whm mentioned in the path... It did not help at all.
     
  6. Annette

    Annette Well-Known Member
    PartnerNOC

    Joined:
    Aug 12, 2001
    Messages:
    445
    Likes Received:
    0
    Trophy Points:
    16
    Try setting that in /etc/my.cnf and drop the B from MB. You'll probably also need to chattr it to keep the system from overwriting it as well. Here's one sample:

    [mysqld]
    set-variable = max_connections=500
    set-variable = max_allowed_packet=8M
     
  7. fog

    fog Well-Known Member

    Joined:
    Jun 22, 2002
    Messages:
    164
    Likes Received:
    0
    Trophy Points:
    16
    Thank you... worked perfectly :)
     
Loading...

Share This Page