Theme editor

Guide Plesk Fixing “Failed to Execute SQL Query on Panel Database” Error in Plesk (2025 Guide)

  • Thread starter Thread starter CL4Y
  • Start date Start date
  • Views 148

CL4Y

Keyboard Ninja
Administrator
Thread owner

Plesk Database Error: Failed to Execute SQL Query 🛠️

One of the most frustrating issues you may encounter during a Plesk migration is the
"Failed to execute SQL query on panel database" error.
The full error message usually looks like this:

Error Message said:
Failed to fetch basic information about resellers, clients and domains data from source servers.
Cause: Failed to execute SQL query on panel database: Cannot connect to the Plesk database. Please, check if the database server is running.
That is a critical error, migration was stopped.

jetto-plesk-sql-failed-fix.webp


This critical issue usually happens when your MySQL/MariaDB server lacks sufficient resources
or the timeout values are too low.
When migrating large data sets, the process may time out before completion.

To fix the problem permanently, we need to increase the database packet size
and extend the read/write timeout values.



🧩 Step 1: Open the MySQL Configuration File

After connecting to your server via SSH, open the MySQL configuration file with a text editor:
Bash:
nano /etc/my.cnf



⚙️ Step 2: Add or Update the Following Parameters

Inside the file, usually under the [mysqld] block,
add or modify the following lines:
Bash:
[mysqld]
max_allowed_packet=10024M
net_read_timeout=3600
net_write_timeout=3600

Note: You can adjust max_allowed_packet according to your needs.
The value 10024M (about 10 GB) is sufficient for very large data packets.
The 3600 seconds value equals 1 hour of timeout duration.



🔁 Step 3: Restart the Database Service

After saving your changes, restart the database service.
Use the corresponding command based on your setup:

Bash:
# For MariaDB
service mariadb restart

# For MySQL
service mysqld restart

✅ After applying these settings, the migration process should complete successfully.
 
Back
Top