Unable to install application: Table 'mysql.procs_priv' doesn't exist

Created:

2016-12-18 06:44:32 UTC

Modified:

2017-08-08 13:12:50 UTC

1

Was this article helpful?


Have more questions?

Submit a request

Unable to install application: Table 'mysql.procs_priv' doesn't exist

Applicable to:

  • Plesk Onyx for Linux

Symptoms

Application like WordPress or Joomla can not be installed. The following error is shown:

Table 'mysql.procs_priv' doesn't exist

OR

Error: Connection to the database server failed: Cannot load from mysql.proxies_priv. The table is probably corrupted

Cause

MySQL tables corruption/misconfiguration.

Resolution

  1. Make sure that MySQL is upgraded by running:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin
  2. Check MySQL database for errors:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqlcheck -uadmin mysql
  3. If any table is corrupted, try to repair it using:

    # plesk db
    
    use mysql;
    mysql> REPAIR TABLE <table_name>;
  4. Try to install an application.

  5. If the issue persists:

    For the issue with mysql.procs_priv table, recreate it manually

     # plesk db
    
    mysql> use mysql;
    mysql> CREATE TABLE `procs_priv` (
    `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
    `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
    `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
    `Routine_name` char(64) CHARACTER SET utf8 NOT NULL DEFAULT '',
    `Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL,
    `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '',
    `Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '',
    `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`),
    KEY `Grantor` (`Grantor`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges';

    For the issue with mysql.proxies_priv table update table schema

     # plesk db
    
    mysql> use mysql;
    mysql> ALTER TABLE mysql.proxies_priv CHANGE User User char(16) NOT NULL;
    mysql> ALTER TABLE mysql.proxies_priv CHANGE Proxied_user Proxied_user char(16) NOT NULL;
    mysql> ALTER TABLE mysql.proxies_priv CHANGE Grantor Grantor char(77) NOT NULL;
Have more questions? Submit a request
Please sign in to leave a comment.