In previous articles, we have learned about user creation and grants in MySQL in detail, but there are a few privileges called global privileges that are meant to be granted to DBA accounts only
for example
PROCESS privileges is a global privilege.
we will try to grant it to user tech_user on author database
for example
PROCESS privileges is a global privilege.
we will try to grant it to user tech_user on author database
mysql>grant process on author.* to
tech_user;
ERROR
1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES
Here we see it failed with error 1221 (HY000).
In order to resolve this error, we need to reconsider this grant statement and its usage.
we must know global privileges can not be granted to the individual database, instead, it should be on all databases. i.e. use of *.* instead of an author.*
grant process on *.* to tech_user;
- FILE
- PROCESS
- REPLICATION CLIENT
- REPLICATION SLAVE
- SUPER
mysql> grant file on *.* to
tech_user;
Query
OK, 0 rows affected (0.01sec)
mysql>flush
privileges;
Query
OK, 0 rows affected (0.01sec)
Thanks a lot!
ReplyDelete