mybatis報錯:this is incompatible with sql_mode=only_full_group_by
在本地啟動專案後,發現控制檯報如下錯誤
bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'data_show.t.target_number' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
發現錯誤原因是
sql_mode=only_full_group_by
於是查閱資料,發現有可能是我本地安裝的mysql用的是預設配置,雖然其他專案執行相同的指令碼可以通過,但是不知為何這個專案會報這個錯誤,修改如下配置即可
sudo vim /etc/my.cnf #沒有的話就建立一個 #將sql_mode 的值改為'' sql_mode = ''
修改完成後,重啟mysql,然後檢視配置
show variables like '%sql_mod%';
最後附上官方的解釋:點選檢視
相關推薦
mybatis報錯:this is incompatible with sql_mode=only_full_group_by
在本地啟動專案後,發現控制檯報如下錯誤bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #3 of SELECT list is not i
錯誤:this is incompatible with sql_mode=only_full_group_by
通過 res 屬性 table mys exp oba etc depend Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘H5APP_W
MYSQL:this is incompatible with sql_mode=only_full_group_by
這個問題其實是由於mysql的預設配置引起的,修改即可;兩種方式: 1.檢視mysql的global.sql_mode ; select @@global.sql_mode; 修改global.sql_mode,去掉ONL
mysql查詢報錯: ORDER BY clause is not in GROUP BY..this is incompatible with sql_mode=only_full_group_by
在用mysql執行如下查詢的時候: select * from `sys_user_group` group by `GROUP_ID` 報錯資訊如下: [Err] 1055 - Expr
mysql命令gruop by報錯this is incompatible with sql_mode=only_full_group_by
插入 gin div ins his columns group col and 在mysql 工具 搜索或者插入數據時報下面錯誤: ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY
5.7 mysql命令gruop by報錯 this is incompatible with sql_mode=only_full_group_by
轉自:https://www.cnblogs.com/jim2016/p/6322703.html 在mysql 工具 搜尋或者插入資料時報下面錯誤: ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY
mysql命令gruop by報錯 this is incompatible with sql_mode=only_full_group_by
在mysql 工具 搜尋或者插入資料時報下面錯誤: ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column
mysql報錯this is incompatible with sql_mode=only_full_group_by
1、報錯資訊 com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: In aggregated query without GROUP BY, expression #2 of SELECT list contains nonagg
mysql5.7報錯this is incompatible with sql_mode=only_full_group_by
下載安裝的是最新版的mysql5.7.x版本,預設是開啟了 only_full_group_by 模式的,但開
5.7.21 this is incompatible with sql_mode=only_full_group_by
第一, 在資料庫控制檯navicat中執行,複製以下程式碼即可,一定要有引號 set @@GLOBAL.sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,N
mysql sql_mode 導致 this is incompatible with sql_mode=only_full_group_by
linux伺服器上的mysql 執行一切正常 在本地mysql 的時候報錯 Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: In aggregated query without
genymotion報錯Your CPU is incompatible with virtualization technologies
genymotion日常報錯,以前也遇到過,始終解決不了,然後就使用android studio原生的模擬器,或者是使用真機. 但是很多時候還是很嚮往genymotion的感覺,然後發現版本是Ubuntu(32-bit),感覺不對啊= =,因為配置是64位的,同時報錯為不相
tomcat報錯:This is very likely to create a memory leak問題解決
這種問題在開發中經常會碰到的,看看前輩的總結經驗 Tomcat記憶體溢位的原因 在生產環境中tomcat記憶體設定不好很容易出現記憶體溢位。造成記憶體溢位是不一樣的,當然處理方式也不一樣。 這裡根據平時遇到的情況和相關資料進行一個總結。常見的一般會
MyBatis報錯:There is no getter for property named 'xxx' in 'class java.lang.String'
在Mybatis的mapper檔案如果傳入的是一個字串型別的引數,且將該引數用來在<if test='"">判斷時,如果直接用引數名來判斷,則會報如標題所示的錯誤, 正確程式碼如下: &l
Mybatis報錯:There is no getter for property named 'xxxx' in 'class xxxx
在網上看見了不少的處理方法,可能每個人遇到的問題一樣,但是出問題的地方不一樣,我所遇到的這個問題,我是如下處理的。我在做JUnit測試的是時候報的這個錯誤,報錯如下:Caused by: org.apache.ibatis.reflection.ReflectionExcep
異常處理:Mybatis報錯:There is no getter for property named 'xxxx' in 'class xxx'
bat 變量 應該 img 分享 mybatis quest 情況 定義 /1、報錯信息: 2、根據報錯的信息,提示我們少了一個getter方法。那麽我們是不是真的就少了這個getter呢?這個時候更應該去檢查我們的model中是不是有某個詞寫錯了。因為當我們定義的這個變
MySQL使用group by 報this is incompatible with sql_mod
函數 size bee type term bst ans 查看sql 聚合函數 下面是employee表的所有數據。使用group by 分組查詢報錯this is incompatible with sql_mode=only_full_group_by查看sql_mo
使用mybatis報錯:Error setting non null for parameter #4 with JdbcType TIMESTAMP
一次性報的異常主要有以下幾個: java.lang.RuntimeException: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException
解決React Native報錯:Navigator is deprecated and has been removed from this package.
報錯如下: Navigator is deprecated and has been removed from this package. It can now be installed and imported from `react