Forums

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

Hi Pythonanywhere,

Thanks for the great service.

I have a large table + 100m rows and want to create a new index, but I receive the error message: ERROR 2013 (HY000): Lost connection to MySQL server during query What can I do? Kind regards,

How long does the query run for? We set a 5min timeout I think...

The query runs for a long time (about 25 min) and then the error appears.

I'm a bit worried that the only way this will work is if you can make it a faster query then. I wonder if you could do something like, create a new empty table with the index, and then copy across all the data in batches?