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:

    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.

  • use --force if you still need to run mysql_upgrade - do this.
    – Akina
    Jan 15 at 11:31
  • Are you upgrading? From what version (exactly) to what version? How is replication involved?
    – Rick James
    Jan 16 at 2:37
  • Did you restart the MySQL Server after doing the upgrade? Jan 16 at 16:12
  • Hey everyone.. thanks for helping out with suggestions. It's been resolved after --force. @Akina -if you want you can put it as an answer :)
    – Channa
    Jan 16 at 17:53


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.