Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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:

CREATE DATABASE restoredb;

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 stackoverflow.com 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

1 Answer 1

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]

[mysqld]
max_allowed_packet=32M
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: serverfault.com/questions/240246/… –  blunders Feb 25 '11 at 13:43

Your Answer

 
discard

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.