Skip to main content

Fixing MySQL Connection Error (ERROR 2002)

If you encounter the following error while restoring a site or during an Update Site → Migrate operation, it usually indicates that the database server ran out of memory and restarted during the process.

ERROR 2002 (HY000): Can't connect to MySQL server on '10.1.1.1' (115)
Why This Happens

Large restore or migration operations require additional database memory. If the database server does not have enough available RAM, the MySQL service may restart, causing the operation to fail with this error.

How to Resolve the Issue

  1. Open your Dedicated Database Server in the Frappe Cloud dashboard.
  2. Upgrade the Database Server Plan to one with more memory.
  3. Wait for the plan upgrade to complete.
  4. Retry the restore or site migration operation.

When You May See This Error

  • Restoring a large site backup.
  • Running an Update Site → Migrate job.
  • Executing database operations that require more memory than the current server plan provides.
Best Practice

If you regularly restore large databases or run resource-intensive migrations, choose a database server plan with sufficient memory before starting the operation. This helps prevent MySQL restarts and reduces the likelihood of migration failures.

Rating: 0 / 5 (0 votes)