Create Role

CREATE ROLE read_only;

Assign Role

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