Skip to content
  • Contact us: +34 944 58 06 58
  • Plesk Partner Program
  • Roadmap
  • Plesk Lifecycle Policy
  • Blog
  • Contact us
  • Plesk 360
  • Contact us: +34 944 58 06 58
  • Plesk Partner Program
  • Roadmap
  • Plesk Lifecycle Policy
  • Blog
  • Contact us
  • Plesk 360
  • Solutions
    By Role
    • Developers
    • Content Managers
    • Digital Agencies
    • IT Admins
    • Web Hosters
    • Hyperscalers
    • Developers
    • Content Managers
    • Digital Agencies
    • IT Admins
    • Web Hosters
    • Hyperscalers
    By Edition
    • Web Admin Edition
    • Web Pro Edition
    • Web Host Edition
    • Business & Collaboration
    • Plesk WP Edition
    • Web Admin Edition
    • Web Pro Edition
    • Web Host Edition
    • Business & Collaboration
    • Plesk WP Edition
    By Cloud
    • Amazon Web Services
    • Microsoft Azure
    • Alibaba Cloud
    • GCP Marketplace
    • Vultr
    • DigitalOcean
    • Linode
    • UpCloud
    • Amazon Web Services
    • Microsoft Azure
    • Alibaba Cloud
    • GCP Marketplace
    • Vultr
    • DigitalOcean
    • Linode
    • UpCloud
    Partner Program
    Exclusive discounts, benefits and exposure to take your business to the next level
    Become a partner
    • By Role
      • Developers
      • Content Managers
      • Digital Agencies
      • IT Admins
      • Web Hosters
      • Hyperscalers
    • By Edition
      • Web Admin Edition
      • Web Pro Edition
      • Web Host Edition
      • Business & Collaboration
      • WP Edition
    • By Cloud
      • Amazon Web Services
      • Microsoft Azure
      • Alibaba Cloud
      • GCP Marketplace
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
    • Partner Program
      • Partner Program
  • Product
    Explore Features
    • Everyone
    • Admins & Web Hosters
    • Developers
    • Designers & Agencies
    • Plesk Features
    • Roadmap
    • Everyone
    • Admins & Web Hosters
    • Developers
    • Designers & Agencies
    • Plesk Features
    • Roadmap
    Key Topics
    • SocialBee
    • WP Toolkit
    • Sitejet Builder
    • SEO Toolkit
    • Joomla! Toolkit
    • Plesk Premium Email
    • Plesk Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder
    • SEO Toolkit
    • Joomla! Toolkit
    • Plesk Premium Email
    • Plesk Email Security
    Feature Packs
    • Business & Collaboration
    • WP Pack
    • Hosting Pack
    • Power Pack
    • Language Pack
    • Business & Collaboration
    • WP Pack
    • Hosting Pack
    • Power Pack
    • Language Pack
    Featured Extension
    SocialBee
    • Explore Features
      • Everyone
      • Admins & Web Hosters
      • Developers
      • Designers & Agencies
      • Plesk Features
    • Key Topics
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Plesk Premium Email
      • Plesk Email Security
    • Feature Packs
      • Business & Collaboration
      • WP Pack
      • Hosting Pack
      • Power Pack
      • Language Pack
    • Featured Extension
      • Extension
  • Pricing
  • Extensions
  • Help Center
  • More
    • Careers
    • Events
    • Plesk University
  • FREE TRIAL
  • Solutions
    • By Role
      • Developers
      • Content Managers
      • Digital Agencies
      • IT Admins
      • Web Hosters
      • Hyperscalers
    • By Edition
      • Web Admin Edition
      • Web Pro Edition
      • Web Host Edition
      • Business & Collaboration
      • WP Edition
    • By Cloud
      • Amazon Web Services
      • Microsoft Azure
      • Alibaba Cloud
      • GCP Marketplace
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
    • Partner Program
      • Partner Program
  • Product
    • Explore Features
      • Everyone
      • Admins & Web Hosters
      • Developers
      • Designers & Agencies
      • Plesk Features
    • Key Topics
      • SocialBee
      • WP Toolkit
      • Sitejet Builder
      • SEO Toolkit
      • Joomla! Toolkit
      • Plesk Premium Email
      • Plesk Email Security
    • Feature Packs
      • Business & Collaboration
      • WP Pack
      • Hosting Pack
      • Power Pack
      • Language Pack
    • Featured Extension
      • SocialBee
  • Pricing
  • Extensions
  • Help center
  • More
    • Careers
    • Events
    • Plesk University
    • Blog
    • Plesk Partner Program
    • Roadmap
    • Plesk Lifecycle Policy
    • Contact Us
  • FREE TRIAL
  • Solutions
    • By Role
      • Developers
      • Content Managers
      • Digital Agencies
      • IT Admins
      • Web Hosters
      • Hyperscalers
    • By Edition
      • Web Admin Edition
      • Web Pro Edition
      • Web Host Edition
      • Business & Collaboration
      • WP Edition
    • By Cloud
      • Amazon Web Services
      • Microsoft Azure
      • Alibaba Cloud
      • GCP Marketplace
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
    • Partner Program
      • Partner Program
  • Product
    • Explore Features
      • Everyone
      • Admins & Web Hosters
      • Developers
      • Designers & Agencies
      • Plesk Features
    • Key Topics
      • SocialBee
      • WP Toolkit
      • Sitejet Builder
      • SEO Toolkit
      • Joomla! Toolkit
      • Plesk Premium Email
      • Plesk Email Security
    • Feature Packs
      • Business & Collaboration
      • WP Pack
      • Hosting Pack
      • Power Pack
      • Language Pack
    • Featured Extension
      • SocialBee
  • Pricing
  • Extensions
  • Help center
  • More
    • Careers
    • Events
    • Plesk University
    • Blog
    • Plesk Partner Program
    • Roadmap
    • Plesk Lifecycle Policy
    • Contact Us
  • 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

Industry
Partners

industry-partner_ALIBABA
industry-partner_GOOGLEPARTNER
industry-partner_MICROSOFT
industry-partner_REDHAT-r2
industry-partner_ALIBABA
industry-partner_AUTOMATTIC
industry-partner_AWS
industry-partner_DIGITALOCEAN
industry-partner_SCALEWAY
Follow us:
Facebook Twitter Linkedin Youtube Github

COMPANY

About Plesk
Our Brand
Legal
Careers
Impressum

PRODUCT

Pricing 
Extensions
What’s new

KNOWLEDGE BASE

Documentation
Help Center
Migrate to Plesk
Contact Us
Hosting Wiki
Preview releases

PROGRAMS

Contributor Program NEW
Partner Program
Affiliate ProgramNEW

COMMUNITY

Blog
Forums 
Plesk University

First defaul

Company

About Plesk
Our Brand
Legal
Careers
Impressum

PRODUCT

Pricing 
Extensions
What’s new

KNOWLEDGE BASE​

Documentation
Help Center
Migrate to Plesk
Contact Us
Hosting Wiki
Preview releases

PROGRAMS​

Contributor Program NEW
Partner Program
Affiliate ProgramNEW

COMMUNITY​

Blog
Forums
Plesk University

Follow us:
Facebook Twitter Linkedin Youtube Github

© 2025 WebPros International GmbH. All rights reserved. Plesk and the Plesk logo are trademarks of WebPros International GmbH.

Managed with love with Plesk WP Toolkit