ubuntu mysql设置sql_mode
由于mysql从5.6升级到mysql5.7报错:
this is incompatible with sql_mode=only_full_group_by
系统环境 ubuntu16.04
解决方案:
/etc/mysql/mysql.conf.d/mysqld.cnf里面加上
sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
重启mysql: service mysql restart