TiDB配置

SQL 模式

https://docs.pingcap.com/zh/tidb/v7.5/sql-mode
原始SQL MODE
查询语句
SHOW GLOBAL VARIABLES LIKE 'sql_mode';
或者
select @@GLOBAL.sql_mode

结果
ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

去掉ONLY_FULL_GROUP_BY
https://docs.pingcap.com/zh/tidb/v7.5/sql-statement-set-variable
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';