Articles in this section

Attempt to connect or drop psa database hangs: Native table 'performance_schema'.'session_variables' has the wrong structure

Plesk for Linux kb: technical ABT: Group A

Applicable to:

  • Plesk for Linux

Symptoms

  • Attempt to connect to or drop psa database hangs

  • mysql_upgrade hangs in the middle

  • It is not possible to start migration with the following error:

    Native table 'performance_schema'.'session_variables' has the wrong structure

  • /var/log/mysql/mysql.log contains errors like the following:

    [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure
    [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
    <lots of entries>
    [ERROR] Native table 'performance_schema'.'cond_instances' has the wrong structure
    [ERROR] Native table 'performance_schema'.'file_instances' has the wrong structure

Cause

Database performance_schema is corrupted.

Resolution

  1. Connect to the server via SSH

  2. Run mysql_upgrade (if it hangs, cancel it):

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

  3. Restart MySQL/MariaDB:

    # systemctl restart mariadb

  4. Run mysql_upgrade once more

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

  5. Connect to psa database:

    # plesk db

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.