数据库安全

1、限制sql执行delete与update语句必须添加条件。

mysql -uroot -proot -U  

执行delete语句没有带条件的话

delete from oldboy.student;  
ERROR 1175 (HY000): You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column  

如果想要执行删除语句的话

SET SQL_SAFE_UPDATES = 0;
原文地址:https://www.cnblogs.com/miaosj/p/10535721.html