MySQL Forums
Forum List  »  Security

Re: Database Permissions, deny for one User one Database
Posted by: Jonathon Coombes
Date: August 24, 2013 04:28PM

Hi Daniel,
It sounds like you are trying to set your privileges by updating the mysql.user and mysql.db tables. This is something that should have stopped many years ago as there is the GRANT/REVOKE statements that will make it much easier. So instead of having to work out a complex table update for a user to be able to read and update a table, but not delete from it, you can simply do:

mysql> GRANT SELECT, INSERT, UPDATE ON mydb.* TO 'user'@'localhost';

This will update the appropriate tables and flush the privileges to make them immediate. This is a much simpler solution, and is consistent across the majority of database servers being used.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Database Permissions, deny for one User one Database
1455
August 24, 2013 04:28PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.