数据库迁移导致Unknown character set: 'GBK' 应用异常

https://blog.csdn.net/u013415591/article/details/82692242
https://blog.csdn.net/gx_1_11_real/article/details/81066336

迁移之前没这个问题,原来迁移后没将lower_case_table_names加上,MySQL有点矫情,严格区分大小写。。。
12:08:19,494 [ERROR]-[com.alibaba.druid.filter.logging.Log4jFilter statementLogError 152]-{conn-10088, pstmt-169279} execute error. SELECT t.region_id, t.region_name, t.region_name_en, t.region_code2, t.region_code3 FROM t_region t WHERE t.is_black = 0 AND t.parent_id = ? order by t.sort_order, convert(TRIM(t.region_name_en) USING GBK) asc
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown character set: 'GBK'

vi /etc/my.cnf
增加
lower_case_table_names=1

service mysqld start

posted @ 2019-11-21 15:49  ritchy  阅读(1011)  评论(0编辑  收藏  举报