当前位置:网站首页>修改mysql的分组报错Expression #1 of SELECT list is not in GROUP
修改mysql的分组报错Expression #1 of SELECT list is not in GROUP
2022-07-25 09:26:00 【colours starry sky】
方法一:
1、通过下方SQL语句查询:
SELECT @@sql_mode;
2、查看是否存在 ONLY_FULL_GROUP_BY字段?
ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
3、如果存在上方字段,使用下方SQL语句:
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’;
方法二:
在mysql的安装目录下创建图中两个文件
**
my.ini文件内容:
**
#此数据库没有my.ini文件,当前文件为后来增加的
[client]
default-character-set = utf8mb4
[mysql]
default-character-set = utf8mb4
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_bin
init_connect=‘SET NAMES utf8mb4’
Remove leading # and set to the amount of RAM for the most important data
cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
innodb_buffer_pool_size = 128M
Remove leading # to turn on a very important data integrity option: logging
changes to the binary log between backups.
log_bin
These are commonly set, remove the # and set as required.
#该参数指定了安装 MySQL 的安装路径,填写全路径可以解决相对路径所造成的问题。
basedir = D:/Program Files/mysql-5.7.23-winx64
#该参数指定了 MySQL 的数据库文件放在什么路径下。数据库文件即我们常说的 MySQL data 文件。
datadir = D:/Program Files/mysql-5.7.23-winx64/data
port = 3306
server_id = …
Remove leading # to set options mainly useful for reporting servers.
The server defaults are faster for transactions and fast SELECTs.
Adjust sizes as needed, experiment to find the optimal values.
join_buffer_size = 128M
sort_buffer_size = 16M
read_rnd_buffer_size = 16M
#定义应该支持的sql语法,对数据的校验等等
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
max_allowed_packet=300M
my-default.ini文件内容:
[mysqld]
character-set-server=utf8mb4
[mysql]
default-character-set=utf8mb4
sql-mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
[mysql]
设置mysql客户端默认字符集
default-character-set=utf8
[mysqld]
#设置3306端口
port = 3306
设置mysql的安装目录
basedir=D:\Program Files\mysql-5.7.23-winx64
允许最大连接数
max_connections=200
服务端使用的字符集默认为8比特编码的latin1字符集
character-set-server=utf8
创建新表时将使用的默认存储引擎
default-storage-engine=INNODB
边栏推荐
- Excel导入导出源码分析
- Subtotal of rospy odometry sinkhole
- CCF 201509-2 date calculation
- emmet语法速查 syntax基本语法部分
- MVC三层架构理解
- dp-851
- Exciting method and voltage of vibrating wire sensor by hand-held vibrating wire acquisition instrument
- SSM integration (simple library management system to integrate SSM)
- mysql历史数据补充新数据
- Probability theory and mathematical statistics 4 continuous random variables and probability distributions (Part 1)
猜你喜欢

T5 paper summary

力扣刷题组合问题总结(回溯)

字典树的使用

CCF 201509-4 Expressway
![[RNN] analyze the RNN from rnn- (simple|lstm) to sequence generation, and then to seq2seq framework (encoder decoder, or seq2seq)](/img/6e/da80133e05b18c87d7167c023b6c93.gif)
[RNN] analyze the RNN from rnn- (simple|lstm) to sequence generation, and then to seq2seq framework (encoder decoder, or seq2seq)

@Import,Conditional和@ImportResourse注解

Mlx90640 infrared thermal imaging sensor temperature measurement module development notes (III)

rospy Odometry天坑小计

GCD详解

TM1638 LED数码显示模块ARDUINO驱动代码
随机推荐
See how a junior student of double non-2 (0 Internship) can get an offer from Alibaba and Tencent
NPM details
微信小程序跳转其他小程序
GCD详解
Configuring ROS development environment with vscode: Causes and solutions to the problem of ineffective code modification
C3D模型pytorch源码逐句详析(三)
Subtotal of rospy odometry sinkhole
Common methods of JS digital thousand bit segmentation
nodejs链接mysql报错:ER_NOT_SUPPORTED_AUTH_MODEError: ER_NOT_SUPPORTED_AUTH_MODE
ADC introduction
CentOs安装redis
ISP image signal processing
An ASP code that can return to the previous page and automatically refresh the page
CCF 201604-2 Tetris
C3D模型pytorch源码逐句详析(二)
salt常见问题
cookie and session
Yarn quick reference manual
VS无线振弦采集仪蓝牙功能的使用
Leetcode 560 前缀和+哈希表