MySQL Security

MySQL database has got the following tables:

host, func – both are blank

tables_priv – Table/column privileges

db – Database level privileges

user – User table

mysql>grant select on samp_db.* to ‘tom’ identified by ‘password’;

Puts entry into Db for samp_db with host = % and user = sony.

mysql>grant all on samp_db.* to ‘tom@localhost‘;

mysql>grant insert, update, select, delete on mysql.* to ‘tom@localhost’ with grant option;

mysql>grant select, insert, update on samp_db.problem_table to ‘tom’ identified by ‘password’;

User contains all ‘N’ for tom. tables_priv contains record for privileges of tom on table samp_db.problem_table.