you are using a safe update mode mysql code example Example: mysql set safe mode off SET SQL_SAFE_UPDATES = 0;