?
Solved

MYSQL dump restore error 2006

Posted on 2009-05-19
3
Medium Priority
?
645 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:
Umesh earned 2000 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

765 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