Solved

MYSQL dump restore error 2006

Posted on 2009-05-19
3
634 Views
Last Modified: 2012-06-27
Hello,

I am having issue trying to restore a MYSQL dump file to MYSQL Server 5.0 on a Windows 2003 RS 32bit platform.

I run the command
shell>mysql --user=user --password dbname < d:\dump\dbname.sql

It begins to run and then I receive the following error message....

ERROR 2006 <HYP000> at line 1311: MySQL Server has gone away.

I have read that the issue could be due to the max allowed packet being too small for the restore query and that it could be timing out so I added the following to my.ini file.

max_allowed_packet=2M
connect_timeout=120
wait_timeout = 1800

After the changes I restarted MYSQL service and tried the restore again but I get the same error except a different line...

ERROR 2006 <HYP000> at line 1313: MySQL Server has gone away.

Does anyone have any ideas why this is happening? The point of this excersize is to set up replication on a slave server so I am stuck right now. please help. Thanks :)
0
Comment
Question by:vinodj181
  • 2
3 Comments
 
LVL 26

Accepted Solution

by:
ushastry earned 500 total points
Comment Utility
Try this command for loading..

mysql --max_allowed_packet=1000000000 --net_buffer_length=1000000 --user=user --password dbname < d:\dump\dbname.sql

0
 

Author Comment

by:vinodj181
Comment Utility
I was able to fix this by upping the max allowed packet to 100m. I guess if anyone every gets this they just need to keep boosting the max allowed packet until it works.

Uphastry, your command also worked. Thank you very much for that!
0
 

Author Closing Comment

by:vinodj181
Comment Utility
Good and simple solution
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Suggested Solutions

Introduction In this installment of my SQL tidbits, I will be looking at parsing Extensible Markup Language (XML) directly passed as string parameters to MySQL 5.1.5 or higher. These would be instances where LOAD_FILE (http://dev.mysql.com/doc/refm…
More Fun with XML and MySQL – Parsing Delimited String with a Single SQL Statement Are you ready for another of my SQL tidbits?  Hopefully so, as in this adventure, I will be covering a topic that comes up a lot which is parsing a comma (or other…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now