#1 - Expression of SELECT list is not in GROUP BY clause and contains nonaggregated column this is incompatible with sql_mode=only_full_group_by
# 设置正确的 sql_mode 即可解决 # 登陆MySQL sudo mysql -hlocalhost -uroot -p123123 SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
# 打开MySQL配置文件 sudo vim /etc/mysql/conf.d/mysql.cnf # 在底部添加下面这句 sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION # 然后重启 sudo service mysql restart
# 第一种方案 SELECT @@FOREIGN_KEY_CHECKS; # 查看单签外键约束命令 SET FOREIGN_KEY_CHECKS=0; # 首先禁用外键约束 TRUNCATE TABLE table_name; # 然后重置表 # 第二种方案,推荐 DELETE FROM table_name; # 不带where条件的删除命令删除所有数据 ALTER TABLE table_name AUTO_INCREMENT=1; # 重置递增初始值
# The maximum number of instrumented table objects.加载的最大表实例数,默认-1自适应 performance_schema_max_table_instances = 600 # The number of table definitions that can be stored in the definition cache,默认-1自适应 table_definition_cache = 400 # The number of open tables for all threads.所有线程能够打开的最大表数,默认为2000 table_open_cache = 128 # innodb引擎的缓存大小,如果启动失败,则调小 innodb_buffer_pool_size = 600M # 联合查询操作所能使用的缓冲区大小,线程独占 join_buffer_size = 8M
# 登陆mysql mysql -hlocalhost -uroot -ppassword # 查看所有全局配置 show global variables; # 查看全局配置转态 show global status; # 筛选特定的配置项,下面是筛选出innodb开始的配置项 show global variables like 'innodb%';
DESC table_name; DESCRIBE table_name; SHOW columns FROM persons;
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有