我正在尝试在 phpmyadmin 中打开 mysql 性能架构。我读过一些文章,例如: how to know mysql my.cnf location https://dev.mysql.com/doc/refman/5.7/en/performance-schema-quick-start.html How to on Performance_schema in mysql?
问题是在我的托管 cpanel 中我不知道如何访问他们的终端。我尝试手动查询插入到性能模式变量中,我得到了这个:
浏览 phpmyadmin 后,我找到了一个编辑该变量更改的选项,但我看到了这个:
我确实相信我的 mysql 数据库用户拥有最高的访问权限,但我不确定。
最佳答案
您应该使用以下声明检查您的权限:
SHOW GRANTS
您确实需要权限才能访问performance_schema.*
https://dev.mysql.com/doc/refman/5.7/en/performance-schema-table-characteristics.html说:
Privileges are as for other databases and tables:
To retrieve from performance_schema tables, you must have the SELECT privilege.
To change those columns that can be modified, you must have the UPDATE privilege.
To truncate tables that can be truncated, you must have the DROP privilege.
在托管环境中,您的权限仅限于为您的托管帐户创建的数据库,这是正常的。
您必须询问托管公司的技术支持,您是否还可以至少拥有 performance_schema
的 SELECT 权限。
回复您的评论:
USAGE 权限仅意味着您可以连接,不能查询任何表或执行任何其他操作。
ALL PRIVILEGES ON user\_dev.*
表示您仅对 user_dev 数据库拥有权限,但对任何其他数据库(例如 Performance_schema)没有权限。
您必须与您的托管公司讨论他们有关 Performance_schema 权限的政策。
关于mysql - 如何在 phpmyadmin 中打开 mysql 性能架构,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47141218/