1、MySQL登录  

mysql -u root password '123456' //登录

mysql -u root -p 设置密码


  

2、MySQL启动

使用mysqld方式启动

cd /opt/mysql-5.7.24-el7-x86_64/bin 

./mysqld --defaults-file=/etc/my.cnf --user=root

 

3、问题描述 which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mod

项目中基础sql没按照严格模式,查询的列(无聚合函数等)没有添加在GROUP BY 后面,导致语法报错,

设置自己本地mysql的sql_mode,去掉ONLY_FULL_GROUP_BY。

查询:

SELECT @@sql_mode;

设置全局sql_mode,需要用root用户设置,如下:

set global sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
参考:https://blog.csdn.net/tsh18523266651/article/details/103062916


相关文章:

  • 2022-12-23
  • 2022-01-02
  • 2021-06-10
猜你喜欢
  • 2022-12-23
  • 2021-11-30
  • 2021-08-05
  • 2021-10-04
  • 2022-12-23
  • 2022-12-23
  • 2021-11-15
相关资源
相似解决方案