Solved

MySQL server has gone away

Posted on 2004-10-18
5
440 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
linux, squid, exchange 14 179
linux 2 108
Linux Hanging with disable Error Output 4 93
Replication of files from Primary and the Secondary Linux servers 14 142
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

735 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