Solved

MYSQL dump restore error 2006

Posted on 2009-05-19
3
637 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
ID: 24432039
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
ID: 24437844
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
ID: 31583325
Good and simple solution
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
I use MySQL for many of my development projects in a Windows environment. To manage my databases (and perform queries) for years I used a tool called MySQL administrator.  This tool has since been replaced by MySQL Workbench. So I decided to m…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

932 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

11 Experts available now in Live!

Get 1:1 Help Now