关于pxc5.6 升级到pxc5.7的问题

##关于pxc5.6 升级到pxc5.7的问题

  • the row size is 8162 which is greater than maximum allowed size (8126
  • that resides in non-transactional storage engine with pxc_strict_mode = ENFORCING or MASTER
  • 用group by 查询时抛出异常

    1. 解决row size is 8192

    1
    2
    3
    4
    5
    建表的时候将默认innodb引擎改为
    ENGINE=MyISAM DEFAULT CHARSET=utf8;但是在集群中MyISAM不支持同步,所以不跟根本解决问题,
    可以试一下
    在mysqld.cnf 中添加
    innodb_strict_mode=off ,然后重启mysql,可以继续使用Innodb引擎

2. 解决engine with pxc_strict_mode = ENFORCING or MASTER异常

1
2
3
4
5
6
临时解决方案:
SET GLOBAL pxc_strict_mode = PERMISSIVE ;
永久生效方案
在mysqld.cnf 中添加
pxc_strict_mode = PERMISSIVE
然后重启服务

3. 解决roup by 查询时抛出如下异常

Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘userinfo.t_long.user_name’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

1
2
3
4
5
6
7
临时解决方案:
mysql> 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> set session sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
永久生效方案
在mysqld.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';
然后重启服务

×

纯属好玩

扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

文章目录
  1. 1. 1. 解决row size is 8192
  2. 2. 2. 解决engine with pxc_strict_mode = ENFORCING or MASTER异常
  3. 3. 3. 解决roup by 查询时抛出如下异常
,