mysql>GRANT SELECT, INSERT, UPDATE, DELETE
->ON widgets.* TO widgetAdmin@localhost
->IDENTIFIED BY 'ilovewidgets';
Assuming that the user widgetAdmin did not yet exist when this query is executed, both the user and db tables will be updated with the necessary rows.
The above is taken from dev.mysql.com.You can also use assign all privileges to a user on a certain database. Following is the syntax.
mysql> GRANT ALL PRIVILEGES ON
-> test.* TO 'ketan'@'localhost'
-> IDENTIFIED BY 'ketans_password';
I find this command exceedingly useful ! A quick way to set up privileges of a user on a db.
3 comments:
Hi there,
I came across your site vir linkreferral and thought it was a really great site! Loved snooping around a bit!
Keep it up.
Regards,
Christoff Gouws
ZAVibes.com
Thanks Christoff !
Keep visiting my blog. I plan to become active now here :-).
Ketan
Post a Comment