security - MySQL Read-Only column based -


i want lock fields/columns in mysql-database, somehow possible?

backgorund: using revive known openx (of course latest version) hacked time. fields prepend , append in ox_zone table.

what did secure system:

  • the adserver on different server
  • the backend not @ default location anymore
  • the backend secured .htaccess , .htpasswd
  • we removed install files
  • we check core-files every minute remote git-repo ensure dont have compromised files (unauthorized file changes)
  • we removed file: adxmlrpc.php because known entry point attackers
  • and nice other tricks dont remember now...

but still columns prepend , append compromised, thought great if lock these fields or set them read only.

but of course other solution.

you can set privileges on column-level (and therefore grant select , insert) user needs on read-only :

grant select (column), insert (column) on table user; 

by replacing column, table , user appropriate values. grant documentation

you need sure not grant higher levels (table, data or global) privileges otherwise override table-level privilege.

best,


Comments