如何在MySQL中的Performance_schema上? [英] How to on Performance_schema in mysql?

查看:256
本文介绍了如何在MySQL中的Performance_schema上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在mysql中打开performance_schema来收集统计信息.

I want to turn performance_schema ON in mysql to collect statistics.

我该如何实现?

推荐答案

以下指南是特定于linux的,但是应该很容易适应Windows.

The following guide is linux-specific, but should easily be adaptable to windows.

您必须检查所使用的mysql服务器版本是否已编译并支持:

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.

通过放入/etc/mysql/my.cnf

[mysqld]
performance_schema

然后执行service mysqld restart(redhat)(或在debian/ubuntu上为service mysql restart)以重新启动mysql服务器.

Afterwards do a service mysqld restart (redhat) (or service mysql restart on debian/ubuntu) to restart the mysql server.

有关如何使用性能模式引擎及其输出的信息,请参见手册:
https://dev.mysql.com/doc /refman/5.5/en/performance-schema-quick-start.html

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

这篇关于如何在MySQL中的Performance_schema上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆