Open the configuration file (
/etc/mysql/my.cnf) and add the following line into the [mysqld]section:[mysqld]
# ... other stuff will probably be here
sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
Save, exit, and restart MySQL:
sudo service mysql restart
Voilà, the SQL mode is permanently changed and I can continue developing the legacy project until I need some additional strictness.
Comments
Post a Comment