I’m getting stuck into a strange problem. When I check for global_variable -it says my performance schema has wrong structure:
mysql> SHOW GLOBAL VARIABLES WHERE Variable_name = 'gtid_mode';
ERROR 1682 (HY000): Native table 'performance_schema'.'global_variables' has the
wrong structure
However, I have already tried with performance schema upgrade and it says -it’s already up to date. Not sure, why it's throwing this error then:
mysql_upgrade
Checking if update is needed.
This installation of MySQL is already upgraded to 5.7.35-38, use --force if you
still need to run mysql_upgrade
Below is the structure of my global_variables table:
mysql> describe performance_schema.global_variables ;
+----------------+---------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------------+---------------+------+-----+---------+-------+
| VARIABLE_NAME | varchar(64) | NO | | NULL | |
| VARIABLE_VALUE | varchar(2048) | YES | | NULL | |
+----------------+---------------+------+-----+---------+-------+
2 rows in set (0.00 sec)
Just in case for more information, I have another host and there also performance schema.global_variables table have the same structure. However, there I don’t see such kind of error/message and it’s properly showing gtid_mode there using the same command. How can I fix it..? my some other work is getting impacted because of this.
Any help is really appreciated. Also, you if can provide cause of this -that can also really be helpful ,so that i’ll take care from the next time.