From the course: MySQL Installation and Configuration (2019)

Unlock this course with a free trial

Join today to access over 22,500 courses taught by industry experts.

Access roles

Access roles

- [Instructor] If you have a number of users who need the same or similar privileges, you don't need to grant them all individually. For this you may use access roles. An access role is a named collection of privileges. The Workbench doesn't have an interface for creating access roles, so we'll use SQL. I'm connected here with my admin user and I'm going to create some access roles here. I say CREATE ROLE, say app_dev and I can actually create several access roles at the same time by simply separating them with commas. So, I have app_read, and app_write and I'll execute this command and I now have three access roles. Now I can grant permissions to these roles using the GRANT statement, so I can say GRANT ALL ON album.* to app_dev. This will grant all of the privileges to do everything that you can do on the album database and all of its tables, so I'll execute that and we see that succeeded. We can see our results down here, we get a green check mark, that means it succeeded. And now…

Contents