Cause of error
The default value incompatibility problem caused by mysql5.7 version, the same problem may also occur in mysql8.0.
The problematic values are:
In strict mode, the date and month are not allowed to be zero.
Set this value, mysql database does not allow the insertion of a zero date, and inserting a zero date will throw an error instead of a warning.
For the GROUP BY aggregation operation, if the column in the SELECT does not appear in the GROUP BY, then this SQL is illegal because the column is not in the GROUP BY clause.
select @@sql_mode, copy the value of the query and delete NO_ZERO_DATE, and then execute
set sql_mode = ‘modify number’.
This method only works in the current session
select @@global.sql_mode, copy the value of the query and delete NO_ZERO_DATE, and then execute
set global sql_mode = ‘modify number’.
This method takes effect in the current service, and it becomes invalid after restarting the MySQL service
In the mysql installation directory, open the my.ini or my.cnf file. Under wamp, SQL_MODE is not set in MySQL 5.7.
1. Found in my.ini file [mysqld]
2. If there is no SQL_MODE, add it, and modify it if it has
Finally restart MySQL
service mysqld restart
- MYSQL gruop by Error: this is incompatible with sql_mode=only_full_group_by
- [Solved] MYSQL 5.7 gruop by eRROR: this is incompatible with sql_mode=only_full_group_by
- Mysql :error 1111. Invalid use of group function
- After installing mysql5.7 on centos7, an error 1045 (28000) is reported: access denied for user ‘root’ @’localhost ‘(using PAS)
- [MySQL] The principle of group by aggregation function and the reason for aggregation limitation SELECT list is not in GROUP BY clause and contains nonaggregated column
- MYSQL Error 1045 (28000): access denied for user ‘root’ @’localhost ‘(using password: Yes)
- Mysql22.214.171.124 Error 1054 (42S22): Unknown Column’password’ In’field List’ When Changing User Password
- Introduction to Relational Databases in SQL
- SQL Server Group sort de duplication row_ number() over ( PARTITION BY t1.col_ 2 ORDER BY 1 )
- ERROR 1054(42S22) Unknown column ‘password’ in ‘field list’ (Fixed)
- (Fixed) workbench MySQL Error Code: 2013. Lost connection to MySQL server during query
- Idea connect mysql error Server returns invalid timezone. Go to’Advanced’ tab and set’serverTimezone’ property
- Solve ERROR 1231 (42000): Variable’time_zone’ can’t
- How to Fix MySQL ERROR 1130 (HY000): Host ‘XXXX’ is not allowed to connect to this MySQL server
- How to Solve SQL state [HY000]: general error 2503
- How to release Oracle PLSQL data lock table
- The attributes of Oracle batch modification sequence (such as cache)_size, increment_(by et al.)
- [Solved] SQLSTATE[HY000]  Connection refused to report an error when PHP connects to mysql in the docker container
- Oracle creates a job and executes the stored procedure with parameters regularly
- ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’