Articles in this section

MariaDB is not able to start: Got error '144 "Table is crashed and last repair failed"' for './mysql/global_priv'

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Symptoms

  • Plesk Obsidian running on a Linux-based operating system
  • Attempts to start the MariaDB service by executing systemctl start mariadb fails with the following error:

    CONFIG_TEXT: Aug 02 08:27:03 localhost mariadbd[25217]: 2023-08-02 8:27:03 0 [ERROR] mariadbd: Got error '144 "Table is crashed and last repair failed"' for './mysql/global_priv'
    Aug 02 08:27:03 localhost mariadbd[25217]: 2023-08-02 8:27:03 0 [ERROR] Fatal error: Can't open and lock privilege tables: Got error '144 "Table is crashed and last repair failed"' for './mysql/global_priv'
    Aug 02 08:27:03 localhost mariadbd[25217]: 2023-08-02 8:27:03 0 [ERROR] Aborting

Cause

The global_priv table in MariaDB is corrupted.

Resolution

  1. Connect to the server via SSH

  2. Add skip-grant-tables in the [mysqld] section of:

    • On Centos/RHEL: /etc/my.cnf
    • On Debian/Ubuntu: /etc/mysql/my.cnf
  3. Restart MariaDB:

    # systemctl restart mariadb

  4. Log into MariaDB:

    # plesk db

    MYSQL_LIN: use mysql;

  5. Repair broken table:

    MYSQL_LIN: MariaDB [mysql]> repair table global_priv;
    +-------------------+--------+----------+----------------------------------------+
    | Table | Op | Msg_type | Msg_text |
    +-------------------+--------+----------+----------------------------------------+
    | mysql.global_priv | repair | warning | Number of rows changed from 195 to 102 |
    | mysql.global_priv | repair | status | OK |
    +-------------------+--------+----------+----------------------------------------+
    2 rows in set (0.009 sec)

  6. Remove skip-grant-tables from my.cnf

  7. Restart MariaDB again:

    # systemctl restart mariadb

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.