Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (20.3k points)

I have a user, whom I want to grant all the READ permission on a db schema.

One way is this :

GRANT SELECT, SHOW_VIEW  ON test.* TO 'readuser'@'%';

Is there a way to group all read operations in grant ?

1 Answer

0 votes
by (40.7k points)

Try using the code given below:

GRANT SELECT ON *.* TO 'user'@'localhost' IDENTIFIED BY 'password';

And, this will create a user with SELECT privilege for all database including Views.

Related questions

0 votes
1 answer
asked Jul 30, 2019 in SQL by Tech4ever (20.3k points)
0 votes
1 answer
0 votes
1 answer
asked Feb 7, 2021 in SQL by dev_sk2311 (45k points)
0 votes
1 answer
0 votes
1 answer
asked Jan 7, 2021 in SQL by Appu (6.1k points)

Browse Categories

...