Skip to content

Comment on Enhancing MySQL: MySQL improvement project

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.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.