Solved

MySQL server has gone away

Posted on 2004-10-18
5
438 Views
Last Modified: 2010-03-18
MySQL server has gone away


that error i got when i need add any sql file


now what?
0
Comment
Question by:free-mind
  • 2
5 Comments
 
LVL 2

Expert Comment

by:mmartha
ID: 12350230
http://dev.mysql.com/doc/mysql/en/Gone_away.html

It has a windoze user comment about your problem: "If " MySQL server has gone away" occurs when trying to upload a file, here's the cure.(...)"

Hope it helps ;D

MMarts
0
 

Author Comment

by:free-mind
ID: 12351840
my OS Linux RH9
0
 
LVL 2

Accepted Solution

by:
mmartha earned 500 total points
ID: 12429640
"The most common reason for the MySQL server has gone away error is that the server timed out and closed the connection." (http://dev.mysql.com/doc/mysql/en/Gone_away.html)

"Here's something that others might run across which I haven't seen mentioned on this site elsewhere. (...) The problem turned out to be caused by a lack of reverse name lookups in DNS for the ip of the clients.  Somehow the dns server listed in /etc/resolv.conf had stopped doing reverse lookup resolution for the zone these clients were in. Some of the hosts were listed in /etc/hosts -- those were the ones that were working.

Simply adding the hostnames to /etc/hosts with the correct ip addresses was enough to get mysqld and the client working normally again."

Or else, you can try this one that I recommended previously:

look for these files in your system:
my-small.cnf
my-large.cnf
my-medium.cnf
my-huge.cnf

with: find / -name "my-*.cnf" -print

then open my-medium.cnf (suggested by the original poster) and change the set-variable = max_allowed_packet line  to 32Mb maybe (that's the example made by the poster in the mysql page)

change the same set-variable under the [mysqldump] tag.


Please answer if this doesn't help you.

MMarts
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
OpenVPN running on Ubuntu 14.4 x64 5 94
CentOS7 Xvnc gdm login 9 209
apache and php 3 110
Debian 8.5 networking quits working every couple of hours 13 103
I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question