MySQL grant permission question
Posted on 2012-03-26
I want to grant a user delete permission to a database but got issue:
Suppose I have a database: sampleDatabase and a table: sampleTable, and username: sampleUser
What I did was:
grant usage on *.* to 'sampleUser'@'184.108.40.206' identified by password 'xxx';
grant select, insert, update, delete on 'sampleDatabase'.* to 'sampleUser'@'220.127.116.11'
But I still got 'delete permission denied for user: sampleUser@18.104.22.168'
When I specially granted permission to table level, it could work:
grant select, insert, update, delete on 'sampleDatabase'.'sampleTable' to 'sampleUser'@'22.214.171.124'
I have many tables in this database, so I can't grant permission one by one. I didn't experience such issue before when I used '*' to grant permission to all tables in a database.
Any hint? Thanks.