Permission error when changing charset and collation on performance_schema and information_schema

I need to change the charset and collation on schemata performance_schema and information_schema from the soon to be deprecated utf8mb3

character_set_system is set to utf8mb3 - I need to change this too

+--------------+--------------------+----------------------------+------------------------+----------+--------------------+

| CATALOG_NAME | SCHEMA_NAME        | DEFAULT_CHARACTER_SET_NAME | DEFAULT_COLLATION_NAME 

+--------------+--------------------+----------------------------+------------------------+----------+--------------------+

| def          | information_schema | utf8mb3                    | utf8mb3_general_ci      |
| def          | performance_schema | utf8mb3                    | utf8mb3_general_ci   |

When I run

mysql> ALTER DATABASE performance_schema CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

I get the error:
ERROR 1044 (42000): Access denied for user ‘root’@‘localhost’ to database ‘performance_schema’

Even though ‘root’@‘localhost’ has Grant_priv and Super_priv set to ‘Y’

Hello @JoeChristmas,
AFAIK, you cannot modify the schema of the performance_schema, nor information_schema. Those are two of three “system databases”. Are you preparing for MySQL 8 upgrade? When you upgrade to MySQL 8, these tables/schema will get converted automatically.

Thanks @matthewb - we’ve already converted to MySQL 8 - we were carrying out a latin1-utf8mb4 conversion - when I noticed that information_schema and performance_schema were using utf8mb3 - which is believe is due to be deprecated too