View Full Version : secure one table within a database
1andyw
11-02-2009, 05:49 PM
Hi,
How best can I limit access to one table within a database but not affect the remaining tables?
Thanks,
Andy
tomws
11-02-2009, 06:50 PM
I think you're looking for GRANT (http://dev.mysql.com/doc/refman/5.1/en/grant.html). The specific command may look something like:
GRANT SELECT ON theDatabaseName.theTableName TO 'restrictedUsername'@'localhost';
EDIT: I should have clarified that example would apply to granting SELECT privileges for a user. The other privileges are also available.
1andyw
11-02-2009, 11:33 PM
Thank you. Just what I need.:)
Andy
meet_me224
11-03-2009, 12:14 PM
You can secure it using Grant...Agree with Tom...
GRANT SELECT ON theDatabaseName.theTableName TO 'restrictedUsername'@'localhost';
will do the job for you.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.