公告
财富商城
积分规则
提问
发文
2020-08-02 02:33发布
beautiful°
I want to turn performance_schema ON in mysql to collect statistics.
performance_schema
How can I achieve this?
See the documentation article about it.
"To change the value of Performance Schema system variables, set them at server startup. For example, put the following lines in a my.cnf file to change the sizes of the history tables:"
[mysqld] performance_schema performance_schema_events_waits_history_size=20 performance_schema_events_waits_history_long_size=15000
Remember you have to restart you mysql server after editing the config file.
The following guide is linux-specific, but should easily be adaptable to windows.
You have to check if the mysql server version you use, is compiled with support for it:
mysqld --verbose --help | grep performance-schema
If you can read something there, you are good to go.
Enable it on server startup by putting into /etc/mysql/my.cnf
/etc/mysql/my.cnf
[mysqld] performance_schema
Afterwards do a service mysqld restart (redhat) (or service mysql restart on debian/ubuntu) to restart the mysql server.
service mysqld restart
service mysql restart
On how to use the performance schema engine and its output, see the manual: https://dev.mysql.com/doc/refman/5.5/en/performance-schema-quick-start.html
最多设置5个标签!
See the documentation article about it.
"To change the value of Performance Schema system variables, set them at server startup. For example, put the following lines in a my.cnf file to change the sizes of the history tables:"
[mysqld] performance_schema performance_schema_events_waits_history_size=20 performance_schema_events_waits_history_long_size=15000
Remember you have to restart you mysql server after editing the config file.
The following guide is linux-specific, but should easily be adaptable to windows.
You have to check if the mysql server version you use, is compiled with support for it:
If you can read something there, you are good to go.
Enable it on server startup by putting into
/etc/mysql/my.cnf
Afterwards do a
service mysqld restart
(redhat) (orservice mysql restart
on debian/ubuntu) to restart the mysql server.On how to use the performance schema engine and its output, see the manual:
https://dev.mysql.com/doc/refman/5.5/en/performance-schema-quick-start.html