该文件位于 /etc/my.cnf,在[mysqld] 下面添加,sql-mode=STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION