MySQL server has gone away

fog

Well-Known Member
Jun 22, 2002
164
0
166
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.
 

Nadeem

Member
May 1, 2002
17
0
301
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.
 

andyf

Well-Known Member
Jan 7, 2002
249
0
316
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.
 

fog

Well-Known Member
Jun 22, 2002
164
0
166
The my.cnf on my machine has only one line and it is max connections and is set to 500.
 

fog

Well-Known Member
Jun 22, 2002
164
0
166
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.
 

Annette

Well-Known Member
PartnerNOC
Aug 12, 2001
445
0
316
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