Reader small image

You're reading from  Advanced MySQL 8

Product typeBook
Published inJan 2019
Reading LevelIntermediate
Publisher
ISBN-139781788834445
Edition1st Edition
Languages
Tools
Right arrow
Authors (3):
Eric Vanier
Eric Vanier
author image
Eric Vanier

Eric Vanier is one of the few DBAs worldwide specializing in MySQL performance, and is an expert with large architectures such as those for Air Miles, Cogeco, McGill University, Bombardier Aerospace, and many more. As a senior DBA and instructor for 18 years, he has a track record in performance and troubleshooting on dozens of high-profile MySQL systems, including complex cluster environments.
Read more about Eric Vanier

Birju Shah
Birju Shah
author image
Birju Shah

Birju Shah is the principal architect for Endurance International Group. He has a bachelor's degree in computer engineering from Gujarat University. He has the experience and expertise to build scalable products for hosting domains. He is passionate about the latest architectural patterns, tools, and technologies, and he helps organizations to follow best practices. He is also passionate about technical training and sessions.
Read more about Birju Shah

Tejaswi Malepati
Tejaswi Malepati
author image
Tejaswi Malepati

Tejaswi Malepati is the Cassandra Tech Lead for Target. He has been instrumental in designing and building custom Cassandra integrations, including a web-based SQL interface and data validation frameworks between Oracle and Cassandra. Tejaswi earned a master's degree in computer science from the University of New Mexico, and a bachelor's degree in electronics and communication from Jawaharlal Nehru Technological University in India. He is passionate about identifying and analyzing data patterns in datasets using R, Python, Spark, Cassandra, and MySQL.
Read more about Tejaswi Malepati

View More author details
Right arrow

MySQL 8's support roles and history

In MySQL 8, there is one new feature that is well worth a special mention. Right on the MySQL server, you can now create roles, specify their privileges, and assign them to users. So, from now on, it will be an easy task for you because you will not need to remember which permissions a team X programmer needs, and whether a team QA must have Z privileges, and so on.

Let's take a concrete example:

To create a role, just run following command:

CREATE ROLE 'devops_developer', 'app_read', 'app_write';

Now give privileges to the role:

GRANT SELECT ON app_db.* TO 'app_read';

And, finally, share this role with a user:

GRANT 'app_read' TO 'read_username1'@'localhost', 'read_username2'@'localhost';

The other options available are as follows:

  • Mandatory...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Advanced MySQL 8
Published in: Jan 2019Publisher: ISBN-13: 9781788834445

Authors (3)

author image
Eric Vanier

Eric Vanier is one of the few DBAs worldwide specializing in MySQL performance, and is an expert with large architectures such as those for Air Miles, Cogeco, McGill University, Bombardier Aerospace, and many more. As a senior DBA and instructor for 18 years, he has a track record in performance and troubleshooting on dozens of high-profile MySQL systems, including complex cluster environments.
Read more about Eric Vanier

author image
Birju Shah

Birju Shah is the principal architect for Endurance International Group. He has a bachelor's degree in computer engineering from Gujarat University. He has the experience and expertise to build scalable products for hosting domains. He is passionate about the latest architectural patterns, tools, and technologies, and he helps organizations to follow best practices. He is also passionate about technical training and sessions.
Read more about Birju Shah

author image
Tejaswi Malepati

Tejaswi Malepati is the Cassandra Tech Lead for Target. He has been instrumental in designing and building custom Cassandra integrations, including a web-based SQL interface and data validation frameworks between Oracle and Cassandra. Tejaswi earned a master's degree in computer science from the University of New Mexico, and a bachelor's degree in electronics and communication from Jawaharlal Nehru Technological University in India. He is passionate about identifying and analyzing data patterns in datasets using R, Python, Spark, Cassandra, and MySQL.
Read more about Tejaswi Malepati