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
Solved

MYSQL dump restore error 2006

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PHP loop not working 4 72
Mysql Left Join Case 10 70
Upgrade MySQL 5.5 to MySQL 5.6 on Windows 13 47
Combining Queries 7 28
Fore-Foreword Today (2016) Maxmind has a new approach to the distribution of its data sets.  This article may be obsolete.  Instead of using the examples here, have a look at the MaxMind API (https://www.maxmind.com/en/geolite2-developer-package). …
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 …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

829 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