Reputation: 59
grant select ON . TO 'username'@'%' with GRANT OPTION; grant select ON . TO 'username'@'IPaddress' with GRANT OPTION;
All the above statements errors out with the Error Code: 1044. Access denied for user 'user'@'IPAddress' to database
FYI I am logged in as a user with all the permissions -- 'GRANT ALL PRIVILEGES ON . '
Upvotes: 0
Views: 4188
Reputation: 3176
You need to be logged in with a user that has WITH GRANT OPTION
as well, such as root@'localhost'. Otherwise, you can do everything else, BUT create new user and issue new grants/permissions.
GRANT OPTION Enable privileges to be granted to or removed from other accounts. Levels: Global, database, table, procedure.
You can read more here are dev.mysql.
Upvotes: 1