Title: org.hibernate.exception.sqlgrammarexception: could not extract resultset, solve group above MySQL 5.7.5_ By is not supported
The reason for the problem:
MySQL 5.7.5 and above functions rely on the detection function. If only is enabled_ FULL_ GROUP_ By SQL mode (by default), MySQL will reject queries that select lists, having conditions, or order by lists, refer to non collection columns that are neither named nor functionally dependent on them in the group by clause( Before 5.7.5, MySQL did not detect any functional dependency, and only was not enabled by default_ FULL_ GROUP_ BY。 For a description of the behavior before 5.7.5, please refer to the MySQL 5.6 reference manual.)
Solution 1:
Open navcat,
Query with SQL:
select @@global.sql_ mode
The values are as follows:
ONLY_ FULL_ GROUP_ BY,STRICT_ TRANS_ TABLES,NO_ ZERO_ IN_ DATE,NO_ ZERO_ DATE,ERROR_ FOR_ DIVISION_ BY_ ZERO,NO_ AUTO_ CREATE_ USER,NO_ ENGINE_ SUBSTITUTION
Remove only_ FULL_ GROUP_ By, reset the value.
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’;
Solution 2:
Successful steps:
Item open
sudo vim /etc/mysql/conf.d/mysql.cnf
Scroll to the bottom of the file and copy and paste
[mysqld]
sql_ mode=STRICT_ TRANS_ TABLES,NO_ ZERO_ IN_ DATE,NO_ ZERO_ DATE,ERROR_ FOR_ DIVISION_ BY_ ZERO,NO_ AUTO_ CREATE_ USER,NO_ ENGINE_ SUBSTITUTION
Go to the bottom of the file
Save and exit input mode
sudo service mysql restart
Restart mysql
complete
Read More:
- [Solved] org.hibernate.exception.SQLGrammarException: could not extract ResultSet at org.hibernate.exception
- [Solved] Hibernate Error: Row was updated or deleted by another transaction
- [Solved] Error resolving template [x] template might not exist or might not be accessible by any of the con
- When the database table field is set to self incrementing, use the entity class to insert or update the data to solve the error (Hibernate Framework)
- Monitoring session to determine whether the user is online or not
- [Solved] nested exception is org.flowable.common.engine.api.FlowableException: Error initialising dmn data mo
- [Solved] Upload Files Error: Request processing failed;nested exception is org.springframework.web.multipart.MultipartExcepti
- [Solved] nested exception is org.apache.ibatis.builder.BuilderException: Error invoking SqlProvider method
- [Solved] org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is
- [Solved] canal-adpter Startup Error: Could not resolve placeholder
- [Solved] “status“:405,“error“ Request method ‘POST‘ not supported“
- Request processing failed; nested exception is java.lang.NullPointerException or UnsatisfiedDependencyE
- [Solved] eureka Startup Error: Unable to start web … nested exception is org.springframework.boot.web.server.WebS
- [Solved] eureka Startup Error: Unable to start web … nested exception is org.springframework.boot.web.server.WebS
- IDEA-Error java error release version 5 not supported (How To Fix)
- [Solved] Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerExcepti
- [Solved] ClickHouse Error: Code: 62. DB::Exception: Syntax error (Multi-statements are not allowed): fai
- HQL statement query error: could not resolve property [Solved]
- Hibernate Error: Error executing DDL “create table course (xxx)“
- [Solved] IDEA2021.3 Error: Failed to write core dump. Minidumps are not enabled by default on client versions of