phpstudy开启mysql出现 Error while setting value 'STRICT_TRANS_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION' to 'sql_mode'

cfn
2020-12-02
1769

phpstudy开启mysql出现 Error while setting value ‘STRICT_TRANS_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION’ to ‘sql_mode’

解决办法:

  1. 打开对应mysql版本配置文件 mysql.ini

微信截图_20201202085548.png

  1. 修改 sql_mode
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

微信图片_20201202085921.png

  1. 保存,重启即可

微信截图_20201202090041.png

评论 1