Symptoms
- Attempt to connect/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 following records:
[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
Corrupted database
.
performance_schema
Resolution
- Connect to the server via SSH.
- Run mysql_upgrade (if it hangs, cancel it):
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin --force
- Restart mysql service:
# service mysql restart
- Run mysql_upgrade once more
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin --force
- Connect to psa database:
# plesk db