#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    5
    Rep Power
    0

    Grant-revoke problem


    I want to give GRANT permission on UPDATE and DELETE , after that i want to revoke an UPDATE. But when i want to make UPDATE mysql allow to change what i want. I want when i revoke UPDATE so i cant make any UPDATE on table sett by user "ivanivan" Please can you help me about it?

    GRANT UPDATE,DELETE ON usc.sett TO 'ivanivan'@'localhost';
    REVOKE delete , update ON usc.sett FROM 'ivanivan'@'localhost';
    update usc.sett set trgt=83 where settid=1
    SHOW GRANTS FOR 'ivanivan'@'localhost';
  2. #2
  3. No Profile Picture
    Problem Solver
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jan 2001
    Location
    Stockholm, Sweden
    Posts
    4,495
    Rep Power
    534
    Which user are you logged in as when you are trying this?

    Because usually you don't give the user account administrative rights which means that if you tried this in the same window you would still be logged in as root.

    And remember that you need to logout and login before changes take effect.
    /Stefan
  4. #3
  5. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,301
    Rep Power
    7170
    You may also need to run FLUSH PRIVILEGES after granting or revoking permissions. I don't know the exact circumstances under which running a flush is necessary, but I normally do it after any change just to be sure that the changes have taken effect.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    5
    Rep Power
    0
    Im login as root. Also i tried to logout and login and same problem.Also i have use flush privilages but no effect.
    Best Regards
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    5
    Rep Power
    0
    I was login as root and make GRANT and REVOKE , logout from root login to ivanivan and try to UPDATE and it works.

IMN logo majestic logo threadwatch logo seochat tools logo