view raw
Dhileepan Dhileepan - 11 months ago 55
SQL Question

Read only table in mysql

I'm using mysql database. In that I have table called

tbl_user
I need to change this as read only table to every user. How to change the table as read only ?

Answer

To grant all user select, use public instead of a complete user list

REVOKE ALL ON tbl_user FROM PUBLIC
GRANT SELECT ON tbl_user TO PUBLIC