1. Query mysql's mode:
select @@global.sql_mode;
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
We need to remove the only_full_group_by mode
2. Set the mode Windows

Open the my.ini file in the MySQL installation directory
Add configuration
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Save after modification
3. Restart MySQL service (administrator permissions)
net stop mysql
net start mysql
The specific errors are as follows: the reason: MySQL 5.7.5 and above functions depend on the detection function. If ONLY_FULL_GROUP_BY SQL mode is enabled (by default), MySQL will reject select lists...
my situation : Mysql 5.7.21 version runs sql and reports the same error. The same sql runs directly locally without error. However, this error occurs when connecting to Mysql on the server (even runni...
When using MySQL, the following query is performed: The error message is as follows: The wrong reason is that my mysql version is 5.7, using the following statement query you know It is set by default...
Scenario: The same product, different models, there are different prices, such as 1 mobile phone has 128G, 2,256g, 2500 yuan, but the product display page, the price shows 2,000 yuan, if it is a produ...
wrong reason This is caused by the version features above MySQL5.7. solution Execute the following code Run and then you can, finish....
When querying a database, the following error occurs: Details are as follows: This is caused by improperly setting sql_mode. Modify sql_mode to: Inquire: 1. Method 1 modify Check again: This modificat...
Group by using a query in Mysql when the following error occurs: In the error was found, it has a problem sql_mode = only_full_group_by. Found by looking for the pattern must have a column correspondi...
solution method one Method Two Finally, remember to restartMYSQLThe service enables the configuration,service mysql restart SQL_Mode commonly used value value usefulness ONLY_FULL_GROUP_BY For Group B...
1. Reasons for the problem MySQL 5.7, realize the dependencies of detection functions. If it is enabledONLY_FULL_GROUP_BY SQL mode (default),MySQLRefuse to choose a list query, conditions, or command ...
1. Principle level This error occurred in the MYSQL 5.7 version and above. The default SQL configuration of MySQL 5.7 is: sql_mode = "only_full_group_by", which strictly executes the "S...