remove the existing user with * privileges
delete from mysql.user where user = "username";
GRANT SELECT, INSERT, UPDATE, DELETE ON dbname.* TO "username"@"127.0.0.1" IDENTIFIED BY "userpassword";
check if your system uses commands other than select, insert, update and delete. if it does, you need to add it in the GRANT command.
to review:
SHOW GRANTS FOR “username”@”127.0.0.1”;
src:
http://dev.mysql.com/doc/mysql-security-excerpt/5.0/en/grant-table-structure.html
http://dev.mysql.com/tech-resources/articles/mysql_intro.html#SECTION0006100000
No comments:
Post a Comment