3 ms·
I've done this on a MySQL database in production back in 2012, on a customer table, for a website that has been mentioned on HN a total of 22 times (not huge bu
by unfunco 5y ago
I've done this on a MySQL database in production back in 2012, on a customer table, for a website that has been mentioned on HN a total of 22 times (not huge but some here have an interest) – the head of technology quickly put up a maintenance page and used the point in time restore feature in RDS and there was no damage, I didn't get in trouble, we were back fully-functional within an hour.
Haven't used MySQL in a while, but when I was using I'd have this alias in my zshrc:
alias mysql="mysql --i-am-a-dummy"
It hasn't happened since.
- thebrain 5y agoUsing --i-am-a-dummy is the best recommendation: root@localhost [main]> update user set password = 'abc123'; ERROR 1175 (HY000): You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column.