A "safe mode" error occurs when running dbscripts
Issue Symptoms
When running database scripts (to create or update), the following error occurs:
"Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column. To disable safe mode, toggle the option in Preferences -> SQL"
Solution
You must disable this safe mode by passing the parameter: SET SQL_SAFE_UPDATES = 0; in the MySql configuration file.
To do this, use the tomcat service and stop mysql:
- Edit the my.ini configuration file
- Search for "SQL_SAFE_UPDATES".
- Make the change
- Save and restart services.
Alternative solution
If you are using the MySQL workbench :
- Connect to your instance
- Go to Edit > Preferences
- Uncheck "Safe updates
- updates are taken into account after reconnection.
Support
If you require assistance to resolve the problem, please ask for support. (See Requesting Support)