Articles in this section

Installation or upgrade failed when mysql.servers table is missing on Plesk for Linux

DoNotDelete:docref Plesk for Linux kb: technical ABT: Group B

Applicable to:

  • Plesk for Linux
  • Plesk for Windows

Symptoms

Plesk or its components installation / upgrade failed with the error in the/var/log/plesk/install/autoinstaller3.log:

CONFIG_TEXT: ERROR 1146 (42S02) at line 1: Table 'mysql.servers' doesn't exist

ERROR while trying to (to Convert MySQL DB users passwords to new format), the query was: UPDATE mysql.user m
INNER JOIN psa.db_users u ON (m.User = u.login)
INNER JOIN psa.accounts a ON (u.account_id = a.id)
INNER JOIN psa.data_bases d ON (u.db_id = d.id)
SET m.Password = PASSWORD(a.password)
WHERE d.type = 'mysql' AND a.type = 'plain';
FLUSH PRIVILEGES;

Cause

MySQL/MariaDB table mysql.serversdoes not exist.

Resolution

Note: To apply the solution from this article it is required to have SSH access to the server. Please contact your hosting provider support or server's administrator if you don't have SSH access or ask them to apply the solution.

Connect to the server via SSH and run the following command for repairing MySQL/MariaDB table:

# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin mysql

For the versions of MySQL/MariaDB Server below 5.1, use the following method:

  1. Update all the mysql privilege tables to be usable by the current version of MySQL/MariaDB

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_fix_privilege_tables --user=admin --verbose

  2. Check for mysql.servers table in the mysql database:

    # grep "servers" /usr/share/mysql/mysql_system_tables.sql
    CREATE TABLE IF NOT EXISTS servers ( Server_name char(64) NOT NULL DEFAULT '', Host char(64) NOT NULL DEFAULT '', Db char(64) NOT NULL DEFAULT '', Username char(64) NOT NULL DEFAULT '', Password char(64) NOT NULL DEFAULT '', Port INT(4) NOT NULL DEFAULT '0', Socket char(64) NOT NULL DEFAULT '', Wrapper char(64) NOT NULL DEFAULT '', Owner char(64) NOT NULL DEFAULT '', PRIMARY KEY (Server_name)) CHARACTER SET utf8 comment='MySQL Foreign Servers table';

  3. Restore the table by executing the following query:

    # grep "servers" /usr/share/mysql/mysql_system_tables.sql | MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -uadmin mysql

Additional information

Unable to log in to Plesk: saved admin password is incorrect

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.