Monday, July 16, 2012

Using Grant and Revoke to Manipulate the Permission Tables



Another way to set a password is to use a GRANT statement. Let me show you the syntax for granting all usage on a database to ‘richard’@’localhost’. The password for Richard is ‘father’, now with the use of grant, I will set the password to ‘chaplong’. I exited first, then I will log-in to my user account Richard with the old password ‘father’.



Now I will try to log-in my user account richard with the old password “father”. The image below it shows the error for logging in with the old password. When you have finished requesting for grant, now your password will change to a new one which is “chaplong”. 




The image below shows how to REVOKE a permission to inserting all tables in databases to regular user richard. It  will now cancelled all permissions regarding for manipulating the tables in all databases to regular user Richard.



No comments:

Post a Comment