1) Edit my.cnf
For Debian :
located at /etc/mysql/my.cnf , add to my.cnf
2) Restart mysql
3) Check it by running this query
For Debian :
located at /etc/mysql/my.cnf , add to my.cnf
[mysqld]If you want strict mode with full group by use this
sql_mode="STRICT_ALL_TABLES"
[mysqld]
sql_mode="STRICT_ALL_TABLES,ONLY_FULL_GROUP_BY"
2) Restart mysql
3) Check it by running this query
SELECT @@GLOBAL.sql_mode;Note: If you want turn off strict mode on run time just run this query
SET @@global.sql_mode='STRICT_ALL_TABLES'Thats it.
OR
SET @@session.sql_mode='STRICT_ALL_TABLES'
No comments:
Post a Comment