backup error Couldn't execute 'SHOW VARIABLES LIKE 'gtid\_mode'': Table 'performance_schema.session_variables' doesn't exist

I have just noticed I now received this error when doing backups. I cannot do backups at this time. I really don’t think this is related to virtualmin but just in case someone is getting this problem and there doesn’t seem to be much topic on it when searching online.

Most discussion have to do with an upgrade from mysql 5.6 to 5.7. I’ve been on 5.7 since the get go. I have not done any updates and I don’t recall seeing a version update when letting virtualmin do its updates.

Does anybody have any ideas about this or encounters something like this?

mysql Ver 14.14 Distrib 5.7.22, for Linux (x86_64)

I just found an answer that has worked for me. reference:

I did this command in mysql without needing a server restart and it seems to have worked without doing any force upgrade etc.