Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

Plesk Backup finish with database warnings: Unable to back up database db_name. Error: SQLSTATE[HY000] [2002] Connection refused

 
2022backupbackup restore migrationdatabasedb

Symptoms

  • A site backup completes with the following warnings regarding several databases:

    Backup Task Mar 19, 2022 02:44 AM Details
    Warning: Database "wp_database1"
    Unable to make database dump. Error: Failed to exec mysqldump: Exit code: 2: mysqldump: Got error: 2013: "Lost connection to MySQL server during query" when using LOCK TABLES
    Warning: Database "wp_database1"
    Unable to back up database wp_database1. Error: DB query failed:
    "SET sql_mode = ''"

    Error: SQLSTATE[HY000] [2002] Connection refused
    Warning: Database "wp_database2"
    Unable to back up database wp_database3. Error: SQLSTATE[HY000] [2002] Connection refused
    Warning: Database "wp_database3"
    Unable to back up database wp_database3. Error: SQLSTATE[HY000] [2002] Connection refused

  • The following logs regarding the same databases can be found at /var/log/plesk/panel.log:

    Failed to process database 'wp_database1' from domain 'example.com': MySQL error 2006: MySQL server has gone away executing query:
    SHOW TABLE STATUS FROM `wp_database1`
    Failed to process database 'wp_database2' from domain 'example.com': MySQL error 2006: MySQL server has gone away executing query:
    SHOW TABLE STATUS FROM `wp_database2`
    Failed to process database 'wp_database3' from domain 'example.com': MySQL error 2006: MySQL server has gone away executing query: 
    SHOW TABLE STATUS FROM `wp_database3`
    Failed to process database 'wp_database4' from domain 'example.com': MySQL error 2006: MySQL server has gone away executing query: 
    SHOW TABLE STATUS FROM `wp_database4`
    
  • The solution described on this article does not solve the issue.

  • When the MySQL log is checked while reproducing the issue, the following errors regarding other Databases are found:

    [ERROR] mysqld: Table './database5/table_name1' is marked as crashed and should be repaired
    [Warning] Checking table:   './database5/table_name1'
    [ERROR] mysqld: Table './other-database/table_name2' is marked as crashed and should be repaired
    [Warning] Checking table:   './database5/table_name2'
    

Cause

One or more crashed database table causes to MySQL service to go down for a short period of time enought to results in the backup errors such as "Lost connection to MySQL server during query" or "Connection refused" or "MySQL server has gone away".

Resolution

Apply one of the following solutions:

A: Restore the affected databases from a working backup by following the instructions on how to restore a user's database from a Plesk backup.

B: Repair the affected databases by following the instructions on How to fix InnoDB corruption cases for the MySQL databases on Plesk for Linux?

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

You Are Always Safe When You Have an Up-To-Date Plesk Backup

Read More »

Plesk with Centralized Database and Network File System

Read More »

All You Need to Know About the Plesk WP Toolkit 4.10 Release

Read More »
Knowledge Base

Plesk and websites are inaccessible after updating Plesk to Obsidian 18.0.43 on RHEL 8-based OS: DB query failed: SQLSTATE[HY000] [2002] No such file or directory

Read More »

Plesk backup fails: No space left on device

Read More »

How to upgrade MySQL 5.5 to 5.6/5.7 or MariaDB 5.5 to 10.x on Linux

Read More »

Unable to make database dump in Plesk: Unknown column ‘generation_expression’ in ‘field list’ (1054)

Read More »

Hosting Wiki

  • Django
  • DBMS Interface
  • DB2
  • Server Redundancy
  • DBMS
  • Linux Containers
  • Google Cloud CDN
  • AMP
  • Bare Metal Server
  • Backup
  • MySQL
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Linux
  • IBM DB2
  • ODBC
  • MongoDB
  • DBA
  • SQL
  • Plesk
  • SQL database
  • NoSQL Database
  • Web Server
  • DNS Server
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family