1、Row size too large
详细报错:
ERROR 1118 (42000) at line 1349: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline
因为 MySQL 表的行大小超过了最大允许的大小(8126 字节)
可以实现下面命令临时关闭mysql验证
SET GLOBAL innodb_strict_mode = 0;
运行以下命令,检查当前 innodb_strict_mode
的状态:
SHOW VARIABLES LIKE 'innodb_strict_mode';
在mysql8.0中使用SET GLOBAL innodb_strict_mode = 0;可能会有以下报错
SQL 错误 [1227] [42000]: Access denied; you need (at least one of) the SYSTEM_VARIABLES_ADMIN or SESSION_VARIABLES_ADMIN privilege(s) for this operation Access denied; you need (at least one of) the SYSTEM_VARIABLES_ADMIN or SESSION_VARIABLES_ADMIN privilege(s) for this operation Access denied; you need (at least one of) the SYSTEM_VARIABLES_ADMIN or SESSION_VARIABLES_ADMIN privilege(s) for this operation
这是因为没有SYSTEM_VARIABLES_ADMIN权限,运行以下命令赋权
GRANT SYSTEM_VARIABLES_ADMIN ON *.* TO 'root'@'%';
FLUSH PRIVILEGES;