AWS Aurora性能架构,如何启用events_statements_history

时间:2017-11-07 16:45:17

标签: mysql amazon-web-services aurora

我正在使用极光实例。我已更新我的参数组以打开性能架构并重新启动实例。但是events_statements_history已关闭。

我错过了什么或者如何实现这一目标?

select * from setup_consumers where name like 'events%statement%';
+--------------------------------+---------+
| NAME                           | ENABLED |
+--------------------------------+---------+
| events_statements_current      | YES     |
| events_statements_history      | NO      |
| events_statements_history_long | NO      |
+--------------------------------+---------+

1 个答案:

答案 0 :(得分:4)

目前无法在AWS控制台中的任何位置进行此设置。您可以执行此操作将其打开:

use performance_schema; update setup_consumers set enabled='yes' WHERE name = 'events_statements_history';" 

但是,每次重新启动Aurora实例时都必须重新执行此操作。

MySQL > show global variables like 'performance_schema';
+--------------------+-------+
| Variable_name      | Value |
+--------------------+-------+
| performance_schema | ON    |
+--------------------+-------+
1 row in set (0.00 sec)

use performance_schema;

MySQL [performance_schema]> select * from setup_consumers WHERE name = 'events_statements_history';
+---------------------------+---------+
| NAME                      | ENABLED |
+---------------------------+---------+
| events_statements_history | NO      |
+---------------------------+---------+
1 row in set (0.01 sec)

MySQL [performance_schema]> update setup_consumers set enabled='yes' 
WHERE name = 'events_statements_history';
Query OK, 1 row affected (0.01 sec)
Rows matched: 1  Changed: 1  Warnings: 0

MySQL [performance_schema]> select * from setup_consumers WHERE name = 
'events_statements_history';
+---------------------------+---------+
| NAME                      | ENABLED |
+---------------------------+---------+
| events_statements_history | YES     |
+---------------------------+---------+
1 row in set (0.00 sec)