Geen cache-versie.

Caching uitgeschakeld. Standaardinstelling voor deze pagina:ingeschakeld (code DEF204)
Als het scherm te langzaam is, kunt u de gebruikersmodus uitschakelen om de cacheversie te bekijken.

Rechercher dans le manuel MySQL

13.7.1.11 SET ROLE Syntax

  1. SET ROLE {
  2.     DEFAULT
  3.   | NONE
  4.   | ALL
  5.   | ALL EXCEPT role [, role ] ...
  6.   | role [, role ] ...
  7. }

SET ROLE modifies the current user's effective privileges within the current session by specifying which of its granted roles are active. Granted roles include those granted explicitly to the user and those named in the mandatory_roles system variable value.

Examples:

  1. SET ROLE DEFAULT;
  2. SET ROLE 'role1', 'role2';
  3. SET ROLE ALL;
  4. SET ROLE ALL EXCEPT 'role1', 'role2';

Each role name uses the format described in Section 6.2.5, “Specifying Role Names”. The host name part of the role name, if omitted, defaults to '%'.

Privileges that the user has been granted directly (rather than through roles) remain unaffected by changes to the active roles.

The statement permits these role specifiers:

  • DEFAULT: Activate the account default roles. Default roles are those specified with SET DEFAULT ROLE.

    When a user connects to the server and authenticates successfully, the server determines which roles to activate as the default roles. If the activate_all_roles_on_login system variable is enabled, the server activates all granted roles. Otherwise, the server executes SET ROLE DEFAULT implicitly. The server activates only default roles that can be activated. The server writes warnings to its error log for default roles that cannot be activated, but the client receives no warnings.

    If a user executes SET ROLE DEFAULT during a session, an error occurs if any default role cannot be activated (for example, if it does not exist or is not granted to the user). In this case, the current active roles are not changed.

  • NONE: Set the active roles to NONE (no active roles).

  • ALL: Activate all roles granted to the account.

  • ALL EXCEPT role [, role ] ...: Activate all roles granted to the account except those named. The named roles need not exist or be granted to the account.

  • role [, role ] ...: Activate the named roles, which must be granted to the account.

Note

SET DEFAULT ROLE and SET ROLE DEFAULT are different statements:

  • SET DEFAULT ROLE defines which account roles to activate by default within account sessions.

  • SET ROLE DEFAULT sets the active roles within the current session to the current account default roles.

For role usage examples, see Section 6.2.10, “Using Roles”.


Zoek in de MySQL-handleiding

Nederlandse vertaling

U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.

Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.

Bij voorbaat dank.

Document heeft de 26/06/2006 gemaakt, de laatste keer de 26/10/2018 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/mysql-rf-set-role.html

De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.

Referenties

  1. Bekijk - html-document Taal van het document:en Manuel MySQL : https://dev.mysql.com/

Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.

Inhoudsopgave Haut