Macbook解决MySQL不能使用groupby分组查询

sql 行转列 case when (简洁版) —— group by 行与行比较【mysql】【全网最全】 mysql 行转列 case when (简洁版) —— group by 行与行比较 阅读详情

博主环境:
MacBook MacOs 11.4
MySQL 5.7.30 for macos10.14 (x86_64)

首先查看mysql安装目录下support-files文件夹下是否有my-default.cnf这个文件

image-20220311133714639

如果没有my-default.cnf文件,就到到 /etc 下创建一个my.cnf文件

sudo vim /etc/my.cnf

my.cnf

# Example MySQL config file for small systems.
#
# This is for a system with little memory (<= 64M) where MySQL is only used
# from time to time and it's important that the mysqld daemon
# doesn't use much resources.
#
# MySQL programs look for option files in a set of
# locations which depend on the deployment platform.
# You can copy this option file to one of those
# locations. For information about these locations, see:
# http://dev.mysql.com/doc/mysql/en/option-files.html
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.
 
# The following options will be passed to all MySQL clients
[client]
default-character-set=utf8
#password   = your_password
port        = 3306
socket      = /tmp/mysql.sock
 
# Here follows entries for some specific programs
 
# The MySQL server
[mysqld]
#解决only_full_group_by的问题
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
 
default-storage-engine=INNODB
character-set-server=utf8
collation-server=utf8_general_ci
port        = 3306
socket      = /tmp/mysql.sock
skip-external-locking
key_buffer_size = 16K
max_allowed_packet = 1M
table_open_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 128K
 
# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (using the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking
server-id   = 1
 
# Uncomment the following if you want to log updates
#log-bin=mysql-bin
 
# binary logging format - mixed recommended
#binlog_format=mixed
 
# Causes updates to non-transactional engines using statement format to be
# written directly to binary log. Before using this option make sure that
# there are no dependencies between transactional and non-transactional
# tables such as in the statement INSERT INTO t_myisam SELECT * FROM
# t_innodb; otherwise, slaves may diverge from the master.
#binlog_direct_non_transactional_updates=TRUE
 
# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /usr/local/mysql/data
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /usr/local/mysql/data
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50
 
[mysqldump]
quick
max_allowed_packet = 16M
 
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
 
[myisamchk]
key_buffer_size = 8M
sort_buffer_size = 8M
 
[mysqlhotcopy]
interactive-timeout

保存并退出。

上面的文件已经解决了only_full_group_by的问题,其他的配置请按需修改。

修改文件执行权限。

sudo chmod 664 /etc/my.cnf

如果有my-deafult.cnf

直接复制一份到/etc 目录下即可

mv /usr/local/mysql/support-files/my-default.cnf /etc/my.cnf

在my.cnf 的[mysqld]添加一行

[mysqld]
#解决only_full_group_by的问题
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTIOxwNxw

参考文章:https://www.sunjs.com/article/detail/ce6ff22e2ef841d59da486a681e7a3c0.html

https://www.sunjs.com/article/detail/d53a75484154402fa3fbcf33c51b23b9.html

使用case when高级用法对数据库进行行列转化 分组、聚合函数使用 看下原来代码: 将kpi_name这一列进行在一行显示 一、不用分组、聚合函数 --测试不用聚合分组函数 select kpi_date, tyt_name, (case when kpi_name='换卡' then kpi_value end ) G4指标, (case when kpi_name='换卡' then num_value end 阅读详情

相关推荐

RV1126 ISP开发实战:从Tuner调试到IQ文件解析

本文详细介绍了RV1126 ISP开发的完整流程,从Tuner调试到IQ文件解析,涵盖了环境搭建、工具使用、参数配置及性能优化等关键环节。通过实战案例和避坑指南,帮助开发者快速掌握Rockchip芯片的ISP开发技巧,提升图像处理质量。

weixin_29195615的博客 569

mysql实现分组排序和不分组排序

大前提 假如你不懂mysql中“=”和“:=”的区别,需要去补习一下这两个知识的用法。 关于mysql中“=”和“:=”的区别,可以参考我的另外一篇文章。https://blog.youkuaiyun.com/weixin_41261833/article/details/103509526 本文如果有不懂的地方,可以留言。 一、不分组排序 1、普通排名:从1开始,按照顺序一次往下排(相同的值也是不同的排...

数据分析与统计学之美 3950

window下移动设备/硬盘报错位置不可用

移动硬盘指示灯亮,但电脑上不显示 报错信息 : 无法访问E:\。参数错误。 报错原因: 移动硬盘打不开提示参数错误,是因为这个H盘的文件系统内部结构损坏导致的。要怎么恢复里面的数据呢? https://jingyan.baidu.com/article/cb5d6105a80242005c2fe0c3.html 解决办法 : 不用格式化修复方法 方法一: 1、单击–开始–运行–输入cmd; 2、...

qq_40907977的博客 4928

MySQL--case when的用法 以及 利用case when 和 group by 实现行转列

MySQL–case when的用法 在MySQL中case when有两种用法: 1.简单函数 CASE [col_name] WHEN [value1] THEN [result1]…ELSE [default] END 2.搜索函数 CASE WHEN [expr] THEN [result1]…ELSE [default] END 简单函数: CASE [col_name] WHEN [value1] THEN [result1]…ELSE [default] END 这种用法就是 匹配列的值,

weixin_42051673的博客 2605

微信小程序scroll-view,点击menu,滚动到锚点;滚动到锚点,激活menu。

首先看看效果图1、首先是点击菜单,滚动列表,这个实现比较简单。直接使用scroll-view 的 scroll-into-view属性,小程序文档。&lt;view class='container'&gt; &lt;!-- 菜单 --&gt; &lt;view class='menu'&gt; &lt;ul&gt; &lt;!-- scrollList 修改cate --&g...

weixin_39834214的博客 1万+

ArcGIS Pro实战:用时空立方体分析共享单车轨迹数据(含3D可视化技巧)

本文详细介绍了在ArcGIS Pro中利用时空立方体技术分析共享单车轨迹数据的全流程。从数据预处理、构建时空立方体,到执行新兴时空热点分析,并最终实现动态3D可视化,手把手教你挖掘城市骑行活动的时空规律。文章重点解析了工具参数设置、常见报错解决方案,并提供了可复用的Python脚本,助力城市规划与交通研究者高效完成时空模式挖掘。

weixin_28323057的博客 136

MySql常用函数之 group_concat()、group by、count()、case when then、unin all、instr()、find_in_set()、locate()使用

可见主与从表关系为一对多,而查询列中的 count() 中根据从表中的条件来判断是否统计入该条数据,符合条件的话返回给 count() 统计依据列,不符合条件返回给 count() 统计依据为 null(默认null不统计)在mysql的关联查询或子查询中,函数 group_concat(arg) 可以合并多行的某列(或多列)数据为一行,默认以逗号分隔。从输出结果可以看出,find_in_set() 函数是精准匹配的意思,2,11 这项集合中匹配不到 1 所以没有查询出来此项,符合预期。

hkl_Forever的博客 4万+

SRAM故障排查实战:如何用Nano Prober定位6T存储单元的异常点

本文详细介绍了在SRAM故障排查中,如何运用Nano Prober(纳米探针)技术精准定位6T存储单元的内部异常。面对传统方法难以发现的电性参数漂移(如晶体管阈值电压偏移)或微小物理缺陷,Nano Prober能直接对单个6T单元内的晶体管进行I-V特性测量,结合失效模式分析,有效解决读写错误等疑难问题,是芯片失效分析的关键工具。

v5w6x的博客 664

sql中不用group by分组进行计总

废话不多说,直接上代码 create table test( keyid int identity, sort varchar(10), qty int ) insert into test(qty,sort) values (1,'aa') ,(2,'aa'),(3,'bb'),(8,'cc'),(9,'cc') select * from test 对qty进行...

积跬步,至千里 1万+

车载测试实战:adb logcat日志高效抓取与问题定位技巧

本文详细介绍了车载测试中adb logcat日志的高效抓取与问题定位技巧。作为车载测试的“第一现场”,adb logcat能实时、精准地抓取系统与应用日志,是定位应用崩溃、ANR及功能异常等问题的关键工具。文章从环境搭建、核心命令组合拳到实战分析与自动化脚本,提供了完整的操作指南,帮助测试人员快速掌握这一必备技能,大幅提升问题排查效率。

ii567的博客 1036

基于STM32F103的二维码识别项目——OV7670篇

此系列用于记录做过的项目,这篇文章介绍基于STM32F103的二维码识别项目之OV7670FIFO模块。

beyourself_he的博客 4288

Mac 运行项目 Mysql8.0及以上 only_full_group_by报错解决方案 (windows同理)

Mysql8.0及以上 only_full_group_by报错解决方案 问题原因 在mysql8.0及以上的版本中,数据库sql_mode默认设置了only_full_group_by 方法一(适合mysql长期不重启、电脑不关机用户) 终端 进入mysql 终端输入 : /usr/local/MySQL/bin/mysql -u root -p 然后输入密码进入mysql 输入:SELECT @@sql_mode; 可以看到如下显示结果: mysql> SELECT @@sql_mod

Smooklazz~的博客 1190

使用TEA5767和stm32制作一台数字FM收音机

本节我们来使用stm32控制一款集成收音机芯片TEA5767,来制作一台FM收音机。 TEA5767是一款低功耗立体声收音IC,接收频率76MHz~108MHz(适应日本/美国/欧洲各FM频段选择)并可以使用软件进行静音和消除噪音。 主要电性能指标:工作电压:2.5V~5.0V,工作电流10mA,立体声分离度30dB,信噪比60dB,输出信号电平75mV。支持I2C总线通信、3-wire总线。 1)硬件设计 TEA5767芯片外围需要搭配较多的电阻、电容、电感、晶振等器件,而且高频电路的PCB设

小白白学电子 1万+

MySQL使用GROUP BY 分组查询时,SELECT 查询字段包含非分组字段

今天写SQL时,发现在使用GROUP BY 分组查询时,SELECT 查询字段包含非分组字段会导致该字段信息不匹配问题,写以此篇记录,并介绍一种解决方法。

qq_45849148的博客 6865

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

MYSQL不能使用Group by的解决办法

偶尔用下MYSQL,加上了个GROUP BY,发现有错误: ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'live.user_gift.u_g_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with

4659

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

【MySQL】MySQL Group By强制问题

*注意:**启用GROUP BY强制模式可能会导致一些旧的SQL语句无法正常执行,因此在设置前需要确认所有的SQL语句都能够适应这种模式;GROUP BY强制模式要求MySQL版本不低于5.7.5,如果MySQL版本过低,就无法启用GROUP BY强制模式。在MySQL中,使用SET GLOBAL命令设置sql_mode参数是临时生效的,如果您重启了MySQL服务器,该设置将会失效,需要重新设置。这里的参数值是一个逗号分隔的字符串,包含了需要启用的所有sql_mode选项。保存并关闭MySQL配置文件。

hs598375774的博客 2489

温度PID控制PLC程序

温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值

mysql有些字段不分组_mysql group by后面可以省略未分组的字段

引自:http://blog.youkuaiyun.com/wxwzy738/article/details/20636563对于group by在mysql中的使用和Oracle的差异性很大,准确的说不光和Oracle和别的数据库差异性一样,这些有点不太遵循标准SQL。我们知道常规的 sql,对于group by来说一定要结合聚合函数,而且选择的字段除了聚合函数外,还必须在group by中出现,否则报错,...

weixin_35318343的博客 2550

mysql 分组group by结合case when 二次分组用法

不建议用法是,,或者说错误用法是 语法通过但是得不到正确的结果 sum 。。。group by case when 正确写法 sum(cash when ) group by 原表是个员工档案,共583人,但case when结合group by用时,写法不同,其出来的结果也不同 例1: select distinct a.Branch, case when kultur = '硕士' then sum(num) else '0' end as 研究生学历, case when kultur.

xu2034029667的博客 1万+

mysql数据库group by_mysql不支持group by的解决方法小结

下载安装的是最新版的mysql5.7.x版本,默认是开启了 only_full_group_by 模式的,但开启这个模式后,原先的 group by 语句就报错,然后又把它移除了。一旦开启 only_full_group_by ,感觉,group by 将变成和 distinct 一样,只能获取受到其影响的字段信息,无法和其他未受其影响的字段共存,这样,group by 的功能将变得十分狭窄了on...

weixin_28853079的博客 1818

mysql 8 groupby 禁用,无效解决办法

MySQL8 默认不支持GroupBy,可通过如下命令查询,如果发现ONLY_FULL_GROUP_BY 则说明未开启 GroupBY。

All of my life is programming! 1161

mysql查询语句不能用Group By

我看了很多解决方法,很啰嗦,我直接给出解决办法。在mysql.ini配置文件中添加。

weixin_49689327的博客 412

【Mac】mysql不支持groupby模式

高版本mysql不支持groupby模式的处理配置

六耳石猴的博客 269

mysql5.7在使用group by的注意事项

mysql5.7在使用group by的注意事项1、问题描述2、解决方案(一):3、解决方案(二)4、解决方案(三)1、云数据库修改方案:2、本地数据库修改方案: 1、问题描述 先看一个sql语句报错: select * from oilDaily group by wellId 这是因为在mysql5.7中开启了sql_mode中的“only_full_group_by”,而这个在执行以往版本中带有group by的语句时就会报错。 2、解决方案(一): select查找的所有属性都必须出现在grou

冲出仁川,走出马德里,故事还会再继续 1753

mysql5.7 groupby_关于Mysql5.7高版本group by新特性报错

一个项目的开发到测试上线运营,团队对项目的管理不成熟会影响项目的开发效率。由于项目是我刚接手,独自在Centos搭建PHP环境,所以就考虑使用高版本,选择了Mysql5.7,本地开发环境还是Windows继承环境,PHP环境和Centos是统一的7.0,但是Mysql版本是5.3的,本地开发一切顺利,到了Centos下出现了一些问题,这就是因为开发环境和测试|线上环境不一致导致的。mysql命令g...

weixin_39649611的博客 339

Mac环境下,MySQL分组 group by 遇错ERROR 1055-Expression 解决方法,MySQL模糊查询like解决方法

1.报错信息 因为默认开了ONLY_FULL_GROUP_BY这个属性,和想要执行的group by 方式相冲突 MySQL 8.0.21 2.查看mysql版本信息 3.输入并执行:select @@global.sql_mode; 4.修改ONLY_FULL_GROUP_BY,成功测试 把ONLY_FULL_GROUP_BY换成set sql_mode= set sql_mode=’STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_

qq_49641620的博客 2215

Mysql8不支持GROUP BY 字段 DESC/ASC

今天为了方便(平时习惯)将一个老项目的数据库放到本机,修改jdbc.properties,sping-mybatis配置,乱起八糟一顿操作.终于连上本机数据库了.结果傻眼了.页面报错.最后查到是Mysql8不支持GROUP BY 字段 DESC/ASC 老项目数据库版本5.1,本机8.0 那么就只好加上ORDER BY 字段 DESC了 这个感觉是凑字数来的 ...

tiantiantbtb的博客 3206
上一篇: Mysql 数据库和数据表结构的基本操作
下一篇: 1-1:Java行业目前主流框架分析
崔凯洋
博客等级 码龄6年 26粉丝 132原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值