cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Go to solution

#2013 - Lost connection to MySQL server during query

I have narrated the problem below.

Issue:
I am facing problem in PhpMyAdmin (MySQL). I am getting below issue when i click c_count table.
"#2013 - Lost connection to MySQL server during query"


c_count table contains 4 lakh rows.
Before i excuted delete query:
1. I was able to view the rows by clicking on c_count in PhpMyAdmin from CPanel and also from workbench.
2. I was able to access and fetching rows from php. It was working fine.
3. I tried to excute the delete query in PhpMyAdmin from CPanel. After i excute this, mysql throwed 400 error.

 

After executed delete query:
1. I tried to open c_count by clicking c_count in PhpMyAdmin from CPanel. I got "#2013 - Lost connection to MySQL server during query".
2. Same error i am getting from workbench.
3. I am not able to access c_count even from php.
4. I am able to open remaining tables in same db except c_count.

 

Delete query
DELETE n1 FROM c_count n1, c_count n2 WHERE n1.id > n2.id AND n1.offline_id = n2.offline_id and n1.enumerator_id=14

Solution which godaddy suggested:


Workbench:
I installed MySQL workbench. Configured remote DB in workbench. I can view all tables. I tried to put select query for all tables.
It's working except c_count and c_count1.

 

Export full DB:
I am able to export whole db. But it is coming structure alone for c_count table.

Export c_count table:
I am able to see structure of table.
I am getting below error when click a "c_count" through cpanel PhpMyAdmin
"#2013 - Lost connection to MySQL server during query".

 

Download backup:
I tried to download the db through backup option in CPanel. I am able to download all db except this db. when click download this db, it showing loading loading....

 

 

I don't have backup in local.

 

What was the problem? kindly give me solution.

 

Godaddy -> Haven't you face this issue ever before? I was trying to get solution from support team. No one give solution. seriously I am getting second thought.

 

 

 

 

4 REPLIES 4
Moderator
Moderator
Solution

Re: #2013 - Lost connection to MySQL server during query

Hi @mcselva,

 

Thanks for being a part of GoDaddy Community. That error usually it indicates network connectivity trouble, you can read more about it here. I'd recommend contacting your Internet Provider for assistance.

 

 

Lisi - GoDaddy | Community Moderator
24/7 support available at x.co/247support

Re: #2013 - Lost connection to MySQL server during query

If the issue is a network issue then how do you explain getting the error when you're running PHP on the same server as the database or in a cronjob on the same server (using localhost for the database connection).  In both these cases it would be on Godaddy's network, would it not?.  Is GoDaddy looking into this issue on their network?

 

Re: #2013 - Lost connection to MySQL server during query

Same issues while doing self upgrading systems. Your servers are not up to mark even with higher resources. Stop giving excuses and provide solutions. The other day server was asking for http auth showing it was running nginx, well as far as we all know cpanels runs apache.

 

I would really switch to other host which actually cares for customers even with much affordable service rates. Your service just sux and getting worse day by day and I would never recommend anyone to buy from you ever if problems keep persisting till next month. You earned no renewals from any of us.

Re: #2013 - Lost connection to MySQL server during query

To clarify, the "Solution" from @Lisi is completely unhelpful here, it is a "canned" response that simply links to the MySQL docs regarding connection timeout configuration in the .ini files which I don't believe users have access to modify anyway.

 

The actual solution that worked for me - hinted at elsewhere here - has to do with the processing power of the host running MySQL. In my case, I had a table with columns using BLOB/varbinary data types and, depending on how these columns were referenced in queries, the server was not able to do the work and respond in time causing the lost connection error. I reworked these tables to drop the varbinary data columns and solve my requirements in a different way. As soon as I dropped them, my queries executed within the connection timeout window and the error went away. So, depending on your perspective, this is either an application design issue on the developer's part or a processing limitation on the server which should, frankly, be powerful enough to handle the work if I'm paying for a "Deluxe" hosting package. YMMV. In any case, GoDaddy's response here is perfunctory at best and was unhelpful to me. YMMV.