This perhaps better belongs in the SQL forum… not sure.
Say I want to set up a user system, with different levels of access. For instance, say I have the following tables:
T1, T2, T3
and want to set up the following privelege levels:
root: (Sys admin – All priveleges)
user: Select on T1, T2, T3
contributor: Select, Update, Insert on T1, T2, T3
Admin: Select, Update, Insert on T1, T2, T3; Delete on T1, T2
What is the best way to achieve this, keeping in mind that I want to allow an arbitrary number of users?
Should I create 3 MySQL users (root already existing), plus an additional users table in my app database, with the user level listed, and the appropriate priveleges set? or should I create a separate MySQL user with the appropriate privaleges?
How does this affect possibly running multiple applications from the same MySQL server?
Thank you in advance for any help.