Mysql Error Code: 2013. Lost connection to MySQL server during query 44.515 sec

3.1k Views Asked by At

I have a table called products2 with about 830,000 rows in it. When I had about 500,000 rows, the query runs slow but fine. And now when I try to query something, it almost doesnt return anything in Mysql Workbench. Showing the following error:

>**strong text**Error Code: 2013. Lost connection to MySQL server during query  44.515 sec

I thought it has something to do with my Workbench connection to my database on Go-daddy host, but same thing happens even if I go straight to PHPadmin online tool. I have Product ID as primary key, unique index, not null and auto increment. The full table structure below:

  • ProductID int(11) AI PK
  • SupplierPartNum varchar(100)
  • OemPartNum varchar(100)
  • UPC varchar(45)
  • CostPrice decimal(10,2)
  • CompatibleWith text
  • ProductName varchar(500)
  • Brand varchar(45)
  • Manufacturer varchar(45)
  • Supplier int(11)
  • Category varchar(45)
  • SubCategory varchar(100)
  • Notes text
  • Notes2 varchar(500)
  • Quantity int(11)
  • PageYield varchar(45)
  • Condition varchar(45)
  • Color varchar(45)
  • Description varchar(21844)
  • IsTruckShip varchar(45)
  • UnitOfMeasure varchar(45)
  • MinQty int(11)
  • Width decimal(8,2)
  • Length decimal(8,2)
  • Height decimal(8,2)
  • Weight decimal(8,2)
  • Returnable varchar(5)
  • Warranty varchar(100)
  • SubCategory2 varchar(100)
  • ImageUrl1 varchar(150)

Queries failed (pretty much any query now fails):

select * from Products2 where Supplier = 15 and Description is not null and ImageUrl1 is not null and flag2 = 1;

select *from Products2 where Supplier = 10;

Did some research and increase the timeout. But doesn't help. I worked with Microsoft Sql before in Management studio and dealed with millions of rows before in mssql, it was fast and easy. I just dont get why doesn't it work in mysql, I am a newbie. I dont think this problem can be solve if my database is on localhost. The internet should be fast enough.

The server is sitting at godaddy's server as I have a hosting plan with them. I dont see any options on their website to set any configuration for the server.

Please help me. Thanks.

0

There are 0 best solutions below