zoukankan      html  css  js  c++  java
  • mysql performance_schema/information_schema授权问题

    mysql> grant all on performance_schema.* to 'testuser'@'%';
    ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'performance_schema'
    mysql> grant all on information_schema.* to 'testuser'@'%';
    ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'information_schema'
    mysql> grant select on information_schema.* to 'testuser'@'%';
    ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'information_schema'

    mysql> grant select on performance_schema.* to 'testuser'@'%';
    Query OK, 0 rows affected (0.00 sec)

    mysql> grant drop on performance_schema.* to 'testuser'@'%';
    Query OK, 0 rows affected (0.00 sec)

    mysql> grant drop on information_schema.* to 'testuser'@'%';
    ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'information_schema'

    总结:

    information_schema所有用户默认就有权限,相当于oracle的user_*视图,目测不支持(也无需)显示授权,包括select。

    performance_schema默认等同于普通db,唯一的区别在于不支持all权限,需要显示授予select/drop等权限(要truncate必须有drop权限)。

  • 相关阅读:
    团队博客18
    团队博客17
    团队博客16
    团队博客15
    团队博客14
    团队博客13
    团队博客12
    课堂作业08--MVC框架的具体应用
    课堂作业07--MVC框架
    课堂作业06--23中设计模式
  • 原文地址:https://www.cnblogs.com/zhjh256/p/5779062.html
Copyright © 2011-2022 走看看