Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deny access to my DB

Status
Not open for further replies.

mrdance

Programmer
Apr 17, 2001
308
SE
I want to share my mySQL with other users but deny accesses for my own databases. I thought that I could use this line to deny access to the database test but it didn't work.

INSERT INTO db
(Host,Db,User,Select_priv,Insert_priv,Update_priv,Delete_priv,
Create_priv,Drop_priv)
VALUES
('localhost','test','testuser','N','N','N','N','N','N');

Any suggestions?
 
Fine-grained user permissions is one of the better features of MySQL.

Rather than inserting records directly into the mysql database, try using the built-in GRANT and REVOKE syntax, which will let you know more directly whether you are accomplishing your goals or not.

See The instructions are nice and clear, and the examples are as obvious as it gets.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top