Symptoms
-
The following errors can be found in
/var/log/mariadb/mariadb.log
after the server reboot:[Warning] mysqld: GSSAPI plugin : default principal 'mariadb/[email protected]' not found in keytab
[ERROR] mysqld: Server GSSAPI error (major 851968, minor 2529639093) : gss_acquire_cred failed -Unspecified GSS failure. Minor code may provide more information. Keytab FILE:/etc/krb5.keytab is nonexistent or empty.
[ERROR] Plugin 'gssapi' init function returned error. -
Unable to view database tables content via phpMyAdmin:
table does not exist in engine
-
Unable to generate Plesk login link:
DB query failed: SQLSTATE[42S02]: Base table or view not found: 1932 Table 'psa.sessions' doesn't exist in engine, query was: DESCRIBE `sessions`
Cause
MariaDB bug MDEV-18298 or its consequences.
Resolution
Check if the InnoDB engine has already been corrupted using the symptoms from the article How to fix InnoDB corruption cases for the MySQL databases on Plesk for Linux? and apply one of the following solutions:
If InnoDB is corrupted
-
Log in to Plesk server via SSH.
-
List all available Plesk daily database dumps sorted by the date:
# ls -lt /var/lib/psa/dumps/mysql.daily.*
-rw------- 1 root root 236253 Feb 3 01:51 mysql.daily.dump.0.gz
-rw------- 1 root root 229653 Feb 2 01:48 mysql.daily.dump.1.gz
-rw------- 1 root root 222485 Feb 1 01:56 mysql.daily.dump.2.gzNote: where
mysql.daily.dump.0.gz
is the most recent daily database dump. -
Navigate to the directory
/var/lib/psa/dumps/
:# cd /var/lib/psa/dumps/
-
Restore the
psa
database from the most recent daily dump:# zcat mysql.daily.dump.0.gz | sed -n '/-- Current Database:
psa
/,/-- Current Database:*/p' | MYSQL_PWD=cat /etc/psa/.psa.shadow
mysql -uadmin -
Disable GSSAPI plugin by commenting it out in
/etc/my.cnf.d/auth_gssapi.cnf
. Use any comfortable text editor, e.g. Vi:#plugin-load-add=auth_gssapi.so
-
Restart MariaDB:
# service mariadb restart
If InnoDB is not corrupted