Linux 下查看mysql 加载的配置文件, 并且解决报错 “this is incompatible with sql_mode=only_full_group_by”
# 查看命令地址
which mysql
/usr/local/mysql/bin/mysql
# 查看配置文件地址
/usr/local/mysql/bin/mysql --verbose --help | grep -A 1 'Default options'
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql/etc/my.cnf ~/.my.cnf
# 编辑以上某个文件,加一行, 重启mysql
# sql_mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"

浙公网安备 33010602011771号