MySQL Error 2013: Lost Connection During Query (Import Fix)
Imports failing with ERROR 2013? The connection is dropping mid‑query. Here's how to stabilize it.
ERROR 2013 means MySQL dropped the connection while processing a long or heavy query.
Common triggers
- Huge INSERT statements
- Slow shared hosting
- phpMyAdmin timeouts
Fastest fix
Split the dump into smaller chunks and import them sequentially. This reduces query time per request.
Related: How to Fix phpMyAdmin Import Timeout Errors and MySQL Error 2006: Server Has Gone Away.
Frequently Asked Questions
Is Error 2013 the same as Error 2006?
They’re related. Both indicate the connection died during a heavy query.
Will CLI import help?
Yes. MySQL CLI is more resilient, but splitting still helps.