I have the table with username and password named 'credentials' table and 'role' table having roles of organization.I want to grant permission to that schema depending on the roles present in the table 'role' of that schema.
what i need to do?
I have the table with username and password named 'credentials' table and 'role' table having roles of organization.I want to grant permission to that schema depending on the roles present in the table 'role' of that schema.
what i need to do?
Do not let anyone or any application have write or even read access to the mysql
database. Exception: the Admin, who preferably has access only from localhost.
This implies GRANT ... ON dbname.* TO ...
is the most that you give do non-admins. (Where dbname
is not mysql
.)
If the application (especially a web application) gets compromised, the hacker can see whatever data that it was GRANTed
. If that includes mysql
, then he can fish around to for the root
password and do other nasties.
I have seen such a security flaw come in via a web page, and get the unix password file!.
local_infile = ON is also a security hole waiting to be exploited. Turning it off puts a crimp in certain load mechanisms, but it is worth it for an exposed web site.