mysql - 删除用户的访问权限是否会影响当前连接?

标签 mysql

如果我(或我的 DBA)撤销用户对 MySQL 数据库的访问权限,现有连接会发生什么情况?

特别是,如果应用程序使用持久连接与数据库通信,当访问权限被撤销时,它会立即受到影响吗?

最佳答案

根据手册here :

A revoked role immediately affects any user account from which it was revoked, such that within any current session for the account, its privileges are adjusted for the next statement executed.

Revoking a role revokes the role itself, not the privileges that it represents. If an account is granted a role that includes a given privilege, and is also granted the privilege explicitly or another role that includes the privilege, the account still is granted that privilege after the first role is revoked. For example, if an account is granted two roles that each include SELECT, the account still can select after either role is revoked.

关于mysql - 删除用户的访问权限是否会影响当前连接?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56759993/

相关文章:

MySQL 选择包含 X 个单词的列

javascript - 创建一个可以离线工作、存​​储数据然后在在线时将其同步到远程 MySQL 的 Web 应用程序?

mysql - 在 mysql 中选择

安卓工作室 : Gradle does not build sql database

mysql - 从表中的同一列中获取多个值

mysql - MySQL 新手寻找多对多关系查询

mysql - 如何将数字插入到mysql列的当前值中

java - android 将 json 传递给 HashMap 到 alertdialog 中显示的 llistview

mysql - JSON Rails 一对多的嵌套属性

mysql - mysql 中的行解释是否意味着该表没有正确索引?