Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to protect mysql table from accidental mass update

Tags:

mysql

Occasional updates statements without "where" clause may easily destroy all your data, I'm always getting nervous when typing UPDATE statement in mysql console, being afraid to press enter before typing "where".

So, I'm wondering if it is possible to protect table from update queries w/o "where" clause on mySQL level? Kind of simply disable it.
And yes, I'm well aware of backups :-) Thanks!

like image 635
bbbonthemoon Avatar asked Dec 07 '25 19:12

bbbonthemoon


1 Answers

Not an insult: turn on --i-am-a-dummy mode.

like image 193
Marc B Avatar answered Dec 09 '25 13:12

Marc B



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!