0

If I (or my DBAs) revoke a user's access to a MySQL database, what will happen to the existing connections?

In particular, if an app is using a persistent connection to talk to the database, will it get affected immediately when the access is revoked?

codeforester
  • 39,467
  • 16
  • 112
  • 140

1 Answers1

2

According to manual 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.

codeforester
  • 39,467
  • 16
  • 112
  • 140
Wolfetto
  • 1,030
  • 7
  • 16