Short answer
The database connection was dropped mid-query, usually because the query took too long or sent too much data at once. It shows up most often when importing a large database file rather than during normal browsing.
For an import, the fix is to split the file into smaller pieces or import it compressed. For a site that shows it in normal use, the cause is usually one slow query or an unoptimised table — repairing and optimising the tables is the first thing to try.
Learn more
- Importing a database that’s too large for phpMyAdminOptions for importing big SQL files: compression, splitting the file, importing table by table, and restoring through a DirectAdmin backup.
- How to repair and optimise database tablesUse phpMyAdmin to check, repair and optimise MySQL tables, and understand when corruption is really the problem.
- Database connection failedFix ‘Access denied for user’, ‘Unknown database’ and connection errors in PHP apps by checking prefixes, passwords, privileges and host.
Step-by-step
- Export a database and import it somewhere elseIntermediate · 25 min · 7 steps