Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql/silence-new.sql 表名大小写导致异常的问题 #3

Open
weisong82 opened this issue May 20, 2020 · 0 comments
Open

sql/silence-new.sql 表名大小写导致异常的问题 #3

weisong82 opened this issue May 20, 2020 · 0 comments

Comments

@weisong82
Copy link

mysql 的lower_case_table_names =0 时候,会抛异常:

Caused by: java.sql.SQLSyntaxErrorException: Table 'ry.QRTZ_LOCKS' doesn't exist

解决方法
修改参数:lower_case_table_names 设置1,不区分大小写。
需要注意两点:
1,修改此参数会造成数据库重启
2,您需要核实下实例下的库,表是否都是小写,否则修改会报错。
查大写的库表名:
select table_schema,table_name from information_schema.tables where table_schema not in("mysql","information_schema") and (md5(table_name)<>md5(lower(table_name)) or md5(table_schema)<>md5(lower(table_schema)));
查看大写的库名
select SCHEMA_NAME from information_schema.SCHEMATA where md5(SCHEMA_NAME)<>md5(lower(SCHEMA_NAME));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant