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

MySQL/MariaDB service fails to start on a Plesk server: Table ‘mysql.user’ doesn’t exist

 
centosdatabasedatabase serverdatabasesdebian

Applicable to:

  • Plesk for Linux

Symptoms

  • MySQL/MariaDB fails to start due to the missing/corrupted tables in the mysql database. The following error messages appear in /var/log/mysqld.log or /var/log/mariadb/mariadb.log:

    [ERROR] Fatal error: Can't open and lock privilege tables: Incorrect file format '<table_name>'


    [ERROR] Fatal error: Can't open and lock privilege tables: Table '<table_name>' doesn't exist


    [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist


    [ERROR] Could not open mysql.plugin table: "Table 'mysql.plugin' doesn't exist". Some plugins may


    /usr/sbin/mysqld: Table '<table_name>' doesn't exist
    [ERROR] Can't open the <table_name> table. Please run mysql_upgrade to create it.


    Could not open mysql.plugin table: "Table 'mysql.plugin' doesn't exist". Some plugins may be not load

  • Plesk is not accessible with one of the following error messages in a web-browser:

    ERROR: PleskDBException: Unable to connect to database: mysql_connect(): No such file or directory /var/run/mysqld/mysqld.sock (Error code: 2002). Please check that database server is started and accessible. (Abstract.php:69)


    ERROR: Uncaught exception 'Zend_Log_Exception' with message '"/var/log/plesk/panel.log" cannot be opened with mode "a"' in /usr/local/psa/admin/externals/Zend/Log/Writer/Stream.php:81


    SQLSTATE[HY000] [2002] No such file or directory.


    SQLSTATE[HY000] [2002] Resource temporarily unavailable

Cause

Tables in the mysql database are missing or corrupted.

Resolution

  1. Connect to the Plesk server via SSH.

  2. Stop the MariaDB/MySQL service:

    # systemctl stop mariadb

    # systemctl stop mysql

  3. Add skip-grant-tables to the my.cnf file:

    3.1. Open the my.cnf file in a text editor. In this example, we are using the vi editor:

    • on CentOS/RHEL-based distributions

      # vi /etc/my.cnf

    • on Debian/Ubuntu-based distributions

      # vi /etc/mysql/my.cnf

    3.2. Add the skip-grant-tables directive under the [mysqld] section:

    [mysqld]
    skip-grant-tables

    3.3. Save the changes and close the file.

  4. Start the MariaDB/MySQL service:

    # systemctl start mariadb

    # systemctl start mysql

    Note: If the service hangs, apply step 6 then proceed from step 4.

  5. Create a database dump of the mysql database:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -uadmin --skip-extended-insert mysql > /root/mysql_dump.`date +%F`.sql

  6. Move the mysql directory to /root:

    # mv /var/lib/mysql/mysql/ /root

  7. Drop the mysql database from MySQL, it exists:

    # plesk db 'drop database mysql'

  8. List all available Plesk daily dumps (the default dumps folder is /var/lib/psa/dumps):

    # ls -lat `cat /etc/psa/psa.conf | grep DUMP_D | grep -v "#" | awk '{print $2}'`/mysql.daily.dump*

    -rw------- 1 root root 236253 Dec 3 01:51 /var/lib/psa/dumps/mysql.daily.dump.0.gz
    -rw------- 1 root root 229653 Jul 2 01:48 /var/lib/psa/dumps/mysql.daily.dump.1.gz
    -rw------- 1 root root 222485 Apr 1 01:56 /var/lib/psa/dumps/mysql.daily.dump.2.gz

  9. Restore the mysql database from the…

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

Plesk with Centralized Database and Network File System

Read More »

Recommended OSs for Plesk

Read More »

CentOS Project Announces Early End-of-Life Date for CentOS 8

Read More »
Knowledge Base

A MySQL/MariaDB query executed in phpMyAdmin/PHP script fails when the ONLY_FULL_GROUP_BY SQL mode is configured

Read More »

Plesk and/or websites are inaccessible: SQLSTATE[08004] [1040] Too many connections error

Read More »

Unable to start MySQL/MariaDB on a Plesk server: Cannot open tablespace table_name which uses space ID

Read More »

Unable to log into Plesk: Unable to connect to database: mysql_connect(): Permission denied /var/lib/mysql/mysql.sock

Read More »

Hosting Wiki

  • RESTful Web Service
  • Server Redundancy
  • Cloud Service Architecture
  • Virtualizor
  • On-Demand Services
  • Linux Containers
  • Bare Metal Server
  • Denial of Service
  • MySQL
  • PhpMyAdmin
  • phpPgAdmin
  • Red Hat Virtualization
  • Virtuozzo
  • Oracle VM Server
  • Citrix Hypervisor
  • Server Virtualization Software
  • Windows Server
  • Linux
  • Virtualization
  • PHP
  • SQL
  • VirtualMin
  • Plesk
  • SQL database
  • NoSQL Database
  • Web Server
  • DNS Server
  • SSH
  • Email Virus Protection
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