Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
We’re running cPanel with MariaDB 10.2 on one of our servers and during a complete database dump we ran into this error:
mysqldump: Got error: 1356: "View 'sys.host_summary' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them" when using LOCK TABLES
We used the following command to dump the databases into a single dump file:
mysqldump -u root -p --all-databases > /root/all_databases.sql
We looked around and found a reference on Stack Overflow. The answer suggests this database is scheduled to be used in MariaDB 10.5 and shouldn’t be on hosts with lower versions, the solution is as simple as dropping the database “sys”.
You are about to delete a database from your server, make sure you have backups of your important databases before you proceed.
Login to MySQL and issue the following command:
drop database sys;