SET DEFAULT ROLE
Define the default role for a user. Learn how to configure which role is automatically active when a user connects to the server.
Syntax
SET DEFAULT ROLE { role | NONE } [ FOR user@host ]Description
Examples
SET DEFAULT ROLE journalist;SET DEFAULT ROLE NONE;CREATE ROLE journalist;
CREATE USER taniel;
SET DEFAULT ROLE journalist FOR taniel;
ERROR 1959 (OP000): Invalid role specification `journalist`
GRANT journalist TO taniel;
SET DEFAULT ROLE journalist FOR taniel;Last updated
Was this helpful?

