Changing permissions
So, we have already covered granting permissions. The only other thing that we can do is to remove permissions from a user. This is done with the help of the REVOKE
statement.
To remove the SELECT
permission in the world.city
table from the johndoe
user, write the following query:
REVOKE SELECT ON the world.city FROM 'johndoe'@'%';
The REVOKE
and GRANT
statements look very similar but do the exact opposite of each other.
In the next section, you will solve an exercise based on what you have learned so far.