记录一下数据库是mysql5.7的问题

飞想翼
飞想翼 This guy is lazy,Introduction has not been set

0 People liked this article · 114 views

在进入用户页面的时候出现报错,查了一下,应该是mysql5.7的问题

在知乎找到文章:

一文带你了解mysql sql model的only_full_group_by模式 - 知乎 (zhihu.com)



永久关闭only_full_group_by模式,这种方法需要在mysql的配置文件里修改,然后重启。

Step 1 找到配置文件/etc/my.cnf(或则关联文件夹找到mysql-server.cnf)

Step 2: 在上述文件内的[mysqld]后追加

sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'

Step 3:保存配置文件后,重启Mysql即可。

Published on 2024-05-22 17:03

Disclaimers:

This document is written by 飞想翼 Original published on WeCenter ,The copyright belongs to the author。

Log in,More exciting content waiting for you to find,Contribute wonderful answers,Participate in comment interaction

go Sign in! No accountgoregister