Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Getting the following error:

ERROR 2006 (HY000) at line 530: MySQL server has gone away

Which I get after running the following from the MySQL (5.1.53-community) command line:


then this from the Windows 7 system command line:

mysql -u root -p restoredb < "C:\restoredb.sql"

I've tried another database restore using another file and the MySQL restore command works fine.

Questions, feedback, requests -- just comment, thanks!!

share|improve this question

migrated from Feb 25 '11 at 0:33

This question came from our site for professional and enthusiast programmers.

It means you lost your connection to the server. Perhaps you left the connection open too long without sending anything and it timed out. Perhaps you tried to send a query that was so large it exceeded the timeout or maximum query size limit. Check MySQL's error log for any hints. – Dan Grossman Feb 24 '11 at 20:54
up vote 2 down vote accepted

Put this in your my.ini (Win) or my.cnf (Linux)

If running as a service, put under [mysqld]

share|improve this answer
@ed209: +1 thanks for posting, so "Put this in your my.ini" -- what is "this"? Meaning the code provided only appears to be for "If running as a service, put under" -- thanks! – blunders Feb 25 '11 at 0:09
Worked, only issue I ran into was related to Windows 7, which I posted posted as a question, then answer here:… – blunders Feb 25 '11 at 13:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.