tags:

views:

321

answers:

2

Hi There

I was wondering if someone can maybe help me, I am trying to upload a mysql insert command and then get the error

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[MySQL][ODBC 5.1 Driver][mysqld-5.0.45-community-nt]MySQL server has gone away

In some files it works perfect, but I suspect with this one the file insert is bigger than the others that works

Any ideas would be appreciated

A: 

Increase connection timeout and/or max_allowed_packets?

Read this for more info about the error:

http://dev.mysql.com/doc/refman/5.0/en/gone-away.html

Shamil
Thanks CT - I have already read this article and think that this is applicable to my error - You can also get these errors if you send a query to the server that is incorrect or too large. If mysqld receives a packet that is too large or out of order, it assumes that something has gone wrong with the client and closes the connection. If you need big queries (for example, if you are working with big BLOB columns), you can increase the I have tried some of the suggestions but it does not seem to work - I have also send the query through phpmyadmin and then it works fine
Gerald Ferreira
An INSERT or REPLACE statement that inserts a great many rows can also cause these sorts of errors. Either one of these statements sends a single request to the server irrespective of the number of rows to be inserted; thus, you can often avoid the error by reducing the number of rows sent per INSERT or REPLACE.
Gerald Ferreira
yep :) Thanks :P
Shamil
A: 

I have finally solved the problem, Thanks CT for your participation...

The problem is I have increased the memory allocation for Mysql by setting max_allowed_packet and some other setting...

However it seems like I actually needed to keep these settings the same and increase the memory on the server... or actually decrease the max_allowed_packet size.

I opted for the last one and reduced the max_allowed_packet size and now it works 100%

Gerald Ferreira