Is there a way to use CREATE ROLE
with MySQL?
It's possible to create roles with PostgreSQL but when I try with MySQL it returns this error message:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'role famille' at line 1
I note that there are people claiming that MySQL doesn't have a role implementation so I would like to add that MySQL 8.0 has a working role implementation:
Example:
CREATE ROLE r1;
GRANT r1 TO myuser@localhost;
GRANT SELECT, INSERT,UPDATE ON db1.* TO r1;
reference: https://dev.mysql.com/doc/refman/8.0/en/roles.html
You can download source code and tested binaries here: https://dev.mysql.com/downloads/mysql/
At this moment in time you have to choose "development release" and MySQL server 8.0.1