Roles and Permission Models in MySQL

Published July 26, 2025 By Sai Sree Ram Gundepudi

Create Role

CREATE ROLE read_only;

Assign Role

GRANT SELECT ON *.* TO read_only;
GRANT read_only TO 'user1'@'localhost';

Was this solution helpful?

Your feedback helps improve our technical knowledge repository.

Share this article