Mysql Privileges

wxdqz

New Member
I am trying to set up privileges for a user to access one Mysql database ONLY. I have read the manual and am able to add users. However, I cannot seem to prevent this user from accessing my other databases. Can someone give me the exact lines to write in unix?

Basically I want a user 'JOE' to be able to access the database "test" and have access to no other database on my server. This is what I did so far:

mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,
ON test TO joe@localhost IDENTIFIED BY 'password';


Mysql> INSERT INTO db VALUES ( 'localhost', test', joe', 'Y', 'Y', 'Y', 'Y', 'N', 'N', 'N', 'N', 'N', 'N');

mysql> FLUSH PRIVILEGES

This is creating a user for me and giving him access but it doesn't prevent him from accessing only 1 database.. What else do I need to do? Please don't tell me to read the manual as I have about 100 times. I know I am missing somethig small but I just cant figure it out. Any help will be greatly appreciated.

thanks,
Greg
 
Back
Top