SET sql_safe_updates = 0;
Update and delete operations will be performed smoothly
SET sql_safe_updates = 1; ( safe update mode)
In the update operation: The update is rejected when the Where Condition (column) has no index available and no limit restriction. Updates are rejected when the where condition is constant and there is no limit restriction.
In a delete operation: when the Where condition is a constant, or if the where condition is null, or if the column in the Where Condition has no index available and no limit restriction, the deletion is rejected.
It is important to note that:
In an update operation, where can be a constant, where the column (columns) can have no index. However, limit restrictions are required.
However, delete must be strict: where cannot be a constant, and the column in the Where condition cannot be indexed!
MySQL Modify and delete permission settings