Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table 'performance_schema.global_status' doesn't exist #5

Closed
moeinrahimi opened this issue Mar 26, 2020 · 6 comments
Closed

Table 'performance_schema.global_status' doesn't exist #5

moeinrahimi opened this issue Mar 26, 2020 · 6 comments

Comments

@moeinrahimi
Copy link

moeinrahimi commented Mar 26, 2020

after importing my2 dashboard on grafana i get this err message on page load and nothing works.
I imported my2.sql with no issue. and also created a new datasource for my2 database with my2 user.
image
my mysql info: mysql Ver 15.1 Distrib 10.1.44-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

@mm86133
Copy link

mm86133 commented Apr 3, 2020

Same issue here.

@meob
Copy link
Owner

meob commented Apr 3, 2020

Same issue here.
Which MySQL version are You using?
Can You send me the result of version() function and of SHOW VARIABLES command?

@AMASTRO00
Copy link

in variable dashboard (MyVar2) replace with :

select concat('MySQL version: ',version(), ' Created at: ', date_format(min(create_time),'%Y-%m-%d %T') ,
' Started at: ', date_format(date_sub(now(), INTERVAL variable_value second),'%Y-%m-%d %T')) info
from information_schema.tables,information_schema.global_status
where variable_name='UPTIME'
group by variable_value

Global_status table is contained information_schema and not in performance_schema.

The same problem is in the my2.sql.
Try to use an editor and replace all performance_schema.global_status with information_schema.global_status. Good luck

@meob
Copy link
Owner

meob commented Apr 13, 2020

Global_status table is contained information_schema and not in performance_schema.
The same problem is in the my2.sql.
Try to use an editor and replace all performance_schema.global_status with information_schema.global_status. Good luck

MySQL 5.7 and 8.0 use performance_schema while older MySQL versions and MariaDB use information_schema. my2.sql code tries to use the right schema for the running version but it is not bullet proof. For Grafana dashboards I have 2 different versions... maybe I'll do the same for the my2 collector. Which fork and version are You using?

@meob
Copy link
Owner

meob commented Mar 22, 2021

Grafana dashboards for MySQL and MariaDB are different

@meob meob closed this as completed Mar 22, 2021
@QuijoteShin
Copy link

I'm adding extra information to deal with the missing table.

First check where the table actually is. It may be at information_schema or performance_schema.
run this query to know where:
select TABLE_SCHEMA , TABLE_NAME from information_schema.TABLES t where TABLE_NAME ='global_status'

Also you may enable performance schema at my.conf or mysqld.conf
[mysqld]
performance_schema=ON

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants