Symptoms
When attempting to connect to phpMyAdmin or perform database maintenance through cPanel's management tools, you receive errors instead. When viewing the errors in MySQL's error logs, you see the following in the list of recent errors:
Storage engine 'MyISAM' does not support system tables. [mysql.db].
Description
This may be caused by having an old version of a database, most likely the "mysql" core database, restored with a database that was made on an older version of MySQL. If you restored a "mysql" database with a backup made on 5.7, and have since upgraded to MySQL 8.0, then the database's schema is out of date and needs to be updated to the new version.
Workaround
The following steps will help you to upgrade the database schema to the latest version:
- Log in to your server using SSH as the root user. For best results, this process makes use of two SSH sessions.
- In the primary session, stop the MySQL service and disable the service monitor to prevent it from being restarted automatically:
/scripts/restartsrv_mysql --stop
whmapi1 configureservice service='mysql' monitored=0
- In the secondary session, tail the MySQL error log:
tail -f /var/log/mysqld.log
- Back in the primary session, start MySQL with the following options to force the upgrade:
mysqld -u mysql --upgrade=FORCE &
- Watch the secondary session output. When MySQL has finished starting, it will report a message similar to this:
[Server] Server upgrade from '80033' to '80033' completed.
[Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
[Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.33' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server - GPL. - When MySQL reports it is "ready for connections," it is safe to proceed. Stop the current MySQL process again:
/scripts/restartsrv_mysql --stop
- Reenable service monitoring, and restart MySQL with the default options to resume normal service:
whmapi1 configureservice service='mysql' monitored=0
/scripts/restartsrv_mysql