Pages

Sunday, October 30, 2011

Create user, grant privileges in mysql

Have you ever been createe a database-based application using mysql??. This blog will discuss about creating a user in the mysql database as well as providing a database object privileges for that user.
The following is script to do that
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON [db_name].* TO '[db_user]'@'[db_host]' IDENTIFIED BY '[db_user_password]';
From that script, if you want to limit user privileges just on manipulating data, you should use select, insert, update, delete.
Because of db_host parameter, we have to define each user for each different host.

1 comment:

Don't Forget To Join Our Community
×
Widget