Dec 20, 2011

Grant Priviliges to USER



GRANT SELECT,INSERT,UPDATE,DELETE ON *.* TO 'user1'@'localhost';


To add all priviliges to the user you don't have to list all of them but you can use the ALL shortcut as follows:


GRANT ALL ON *.* TO 'user1'@'localhost';


Or you can add some priviliges as well in a form like this:

  1. INSERT INTO user (Host,User,Password,Select_priv,Insert_priv)
  2. VALUES('localhost','user4',PASSWORD('pass3'),'Y','Y');

No comments: