Disabling MySQL strict mode on the server
MySQL Strict Mode controls how invalid or missing values in data changing queries are handled. This includes
CREATE TABLE statements. With MySQL Strict Mode enabled, which is the default state, invalid or missing data may cause warnings or errors when attempting to process the query.
When Strict Mode is disabled, the same query would have its invalid or missing values adjusted and would produce a simple warning. This may seem like the preferred result; however, with Strict Mode disabled, specific actions may cause unexpected results. For instance, when the value being inserted exceeds the maximum character limit, it is truncated to fit the limit.
For GFI HelpDesk to run on your server, you need to disable Strict Mode in your MySQL database.
This topic provides the instructions to make changes to the configuration to disable the Strict Mode.
To disable the Strict Mode, do the following:
- Open the
my.cnffile for editing (the file you have depends on whether you are running Windows or Linux).
- Find the following line: sql_mode = "STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
- Replace it with the line below:
If the line is not found, insert the line under the
[mysqld]section (if there is no
[mysqld]section, create it).Create
mysqlIdin the following way:
- Restart the MySQL service for the change to take effect.
If restarting is not a feasible option at the moment, you may log into the database server and execute the below command for the changes to take effect immediately. However, the change is discarded the next time the MySQL service restarts unless the above process is performed.set global sql_mode='';