Question

I'm trying to import a large database (the .sql file is 300MB) on a local MySQL install, it imports for about two seconds then I get this error message:

ERROR 2013 (HY000) at line 457: Lost connection to MySQL server during query

Apparently this is a fairly common error message, but I've tried various different things (all of which haven't solved my problem)

Lots of people reference a my.cnf / my.ini configuration file which needs editing, the problem is I couldn't for the life of me find this file, I found various .ini files in this directory:

C:\Program Files\MySQL\MySQL Server 5.5

But none were entitled my.ini, so (I'm not sure if this is correct) I simply created a my.ini and my.cnf file and put them in the directory above, the contents of this file are as follows:

[mysqld]
max_allowed_packet = 400M
innodb_force_recovery = 4
net_read_timeout = 100
interactive_timeout = 100
wait_timeout = 100
connect_timeout = 100
skip-name-resolve

[mysqldump]
max_allowed_packet = 400M

Firstly, I'm not sure where the configuration file is actually located (I've tried searching my computer for my.ini and my.cnf, both to no avail) so is there any way to find that?

Secondly, could the issue be at all unrelated to settings in the configuration file? Is there anything else that could be causing this?

Some background info:

  • The Database I'm trying to restore is a Magento database
  • I'm running it on IIS7 (don't think this is relevant as the problem is with MySQL though)
  • the MySQL version is 5.5

I've tried importing the database with MySQL workbench and with SQLyog community edition, but they both fail at just about the same place (I think SQLyog failed about 2 lines earlier/later)

Was it helpful?

Solution

In the end I re-installed MySQL, and that alone seemed to solve the problem (very strange!)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top