修改 mysql 配置文件
vim /etc/my.cnf
将下面话复制到 [mysqld] 下
sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'
结果:
重启 mysql
systemctl stop mysqld.service
systemctl start mysqld.service
修改 mysql 配置文件
vim /etc/my.cnf
将下面话复制到 [mysqld] 下
sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'
结果:
重启 mysql
systemctl stop mysqld.service
systemctl start mysqld.service