1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contai
生活随笔
收集整理的這篇文章主要介紹了
1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contai
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
文章目錄
- 1. 現(xiàn)象
- 2. docker內(nèi)部mysql容器 解決方案
- 3. windows和linux 解決方案
1. 現(xiàn)象
在使用sql語句創(chuàng)建表時,報錯:
1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column ‘information_schema.PROFILING.SEQ’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
2. docker內(nèi)部mysql容器 解決方案
修改配置文件:在配置文件里加一句就可以了:
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION如果是docker中mysql容器請參考這篇博客,修改的是同一個文件
解決Linux docker中的mysql區(qū)分大小寫問題
3. windows和linux 解決方案
windows的在安裝目錄里找到my.ini或者centos7在/etc/my.cnf中,添加內(nèi)容如下:
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,添加內(nèi)容進去后,關(guān)掉mysql服務重啟
# 關(guān) net stop mysql # 啟 net start mysqlcentos7在/etc/my.cnf中添加,重啟
service mysqld restart或者 systemctl restart mysqld總結(jié)
以上是生活随笔為你收集整理的1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contai的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Git 切换提交历史节点
- 下一篇: RabbitMQ非root用户安装(Li