Solved

MYSQL dump restore error 2006

Posted on 2009-05-19
3
641 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
[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
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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Introduction In this article, I will by showing a nice little trick for MySQL similar to that of my previous EE Article for SQLite (http://www.sqlite.org/), A SQLite Tidbit: Quick Numbers Table Generation (http://www.experts-exchange.com/A_3570.htm…
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

749 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