Can you restrict a field from being updated without granting any additional user privileges ?
Basically a value in a row can only be set during an insert statement.
Yes. If you grant only insert
and select
privileges. Like:
grant select, insert, update(message, time) on hibtest.message to 'worm'@'localhost' identified by 'worm'
... this way the user can only update message
and time
columns.
You can use an update trigger to prevent the value from being updated.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With