Comment on Enhancing MySQL: MySQL improvement projectComments−santa_boy1yCurious, Is there an easy way to do row-level and field-level security in MySQL?−fipar1yField-level is just column privileges. Row-level, I think you can only achieve that with views, which is less than ideal.−bawolff1yViews?−user324893181yI guess he meant to create a view of a table with “where” conditions depend on your user privileges−bawolff1yYes, using the DEFINER clause.For all i know there could be other methods in mysql at this point, but views is how people have been doing fine grained row permissions in mysql for decades.
Comments
Curious, Is there an easy way to do row-level and field-level security in MySQL?
Field-level is just column privileges. Row-level, I think you can only achieve that with views, which is less than ideal.
Views?
I guess he meant to create a view of a table with “where” conditions depend on your user privileges
Yes, using the DEFINER clause.
For all i know there could be other methods in mysql at this point, but views is how people have been doing fine grained row permissions in mysql for decades.