The perfect solution for MySql version problem sql_mode=only_full_group_by

The perfect solution for MySql version problem sql_mode=only_full_group_by

1. Check sql_mode

select @@sql_mode

The queried value is:

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

2. Remove ONLY_FULL_GROUP_BY and reset the value.

set @@sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER
,NO_ENGINE_SUBSTITUTION';

3. The above changes the global sql_mode, which is valid for newly created databases. For an existing database, you need to execute the following command under the corresponding data:

set sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';

The above is the perfect solution to the MySql version problem sql_mode=only_full_group_by introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

You may also be interested in:
  • Reasons and solutions for MySQL sql_mode modification not taking effect
  • Detailed explanation of MySQL sql_mode query and setting
  • Detailed explanation of viewing and setting SQL Mode in MySQL
  • Detailed explanation of sql_mode mode example in MySQL
  • Django2 connects to MySQL and model test example analysis
  • Detailed explanation on reasonable settings of MySQL sql_mode
  • MySQL sql_mode analysis and setting explanation
  • The pitfalls and solutions caused by the default value of sql_mode in MySQL 5.7
  • Solve the MySQL 5.7.9 version sql_mode=only_full_group_by problem
  • Detailed explanation of SQL Mode usage in MySQL
  • mysql sql_mode="" function description
  • Detailed explanation of the use of MySQL sql_mode

<<:  How to use JSX to implement Carousel components (front-end componentization)

>>:  Explanation of the new feature of Hadoop 2.X, the recycle bin function

Recommend

Why is UTF-8 not recommended in MySQL?

I recently encountered a bug where I was trying t...

Detailed steps for setting up and configuring nis domain services on Centos8

Table of contents Introduction to NIS Network env...

Detailed tutorial for installing ElasticSearch:7.8.0 cluster with docker

ElasticSearch cluster supports動態請求的方式and靜態配置文件to ...

CSS hacks \9 and \0 may not work for hacking IE11\IE9\IE8

Every time I design a web page or a form, I am tr...

Docker sets up port mapping, but cannot access the solution

#docker ps check, all ports are mapped CONTAINER ...

Teach you how to subcontract uniapp and mini-programs (pictures and text)

Table of contents 1. Mini Program Subcontracting ...

Vue sample code for online preview of office files

I'm working on electronic archives recently, ...

18 common commands in MySQL command line

In daily website maintenance and management, a lo...

Use of Linux ipcs command

1. Command Introduction The ipcs command is used ...

Differences between this keyword in NodeJS and browsers

Preface Anyone who has learned JavaScript must be...

MySQL multi-table join introductory tutorial

Connections can be used to query, update, and est...

Analysis of the Linux input subsystem framework principle

Input subsystem framework The linux input subsyst...