当前位置:网站首页>which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_ mod

which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_ mod

2022-06-11 17:28:00 Young ~ years

edit
vim /etc/my.cnf
Add... At the bottom of the file :

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

restart :systemctl restart mysqld It didn't work ,
Check the cause of the error
cat /var/log/mysqld.log

 /usr/sbin/mysqld: 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'.

 Insert picture description here
reason :8.0 The above has been cancelled NO_AUTO_CREATE_USER This keyword , stay mysql.ini Medium sql_mode Delete this keyword from the .

Final configuration

sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION

 Insert picture description here

原网站

版权声明
本文为[Young ~ years]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/162/202206111714137771.html