LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to remove access from only one database(MySQL) (https://www.linuxquestions.org/questions/linux-general-1/how-to-remove-access-from-only-one-database-mysql-709339/)

dipuasks 03-05-2009 05:30 AM

How to remove access from only one database(MySQL)
 
Hello,

I have given access for all databases to one user with the below command:

GRANT ALL PRIVILEGES ON *.* TO user@host IDENTIFIED BY 'passwd' WITH GRANT OPTION;

Now I want to remove privilege from that user from only one database. How can I do this?

Thanks,
Dipu

bathory 03-05-2009 06:49 AM

AFAIK you should revoke all privileges on *.*:
Code:

REVOKE ALL PRIVILEGES ON * . * FROM user@host
and then add manually the DBs that you want your user to have all privileges

dipuasks 03-05-2009 10:09 AM

Yes that I know but it's really irritating to do that when there are lots of databases on one server and I guess there is nothing like SCHEMA thing in MySQL


All times are GMT -5. The time now is 02:19 AM.