问题描述
我将MySQL数据库表导入了Amazon RDS.我的问题是我的查询不再起作用,并且收到错误消息,表明我的表文件夹"不存在.这样做的原因是表名并非全都用小写大写,这会导致查询抛出此错误.
I imported my MySQL database tables to Amazon RDS. My problem is that my queries don't longer work and I get error that my table 'Folders' doesn't exists. The reason for that is that the table names are not all with lower casing, which causes the query to throw this error.
是否可以使用MySQL Workbench针对Amazon RDS数据库以大写形式更改表名称.我尝试使用更改表",但是当我尝试重命名为相同名称并更改为大写字母时,它给我一个错误所选名称与存在表冲突".有什么办法解决此问题吗?
Is there a way to change the table name with one with uppercase using MySQL Workbench against Amazon RDS database. I tried using 'alter table', but it gives me an error "Selected name conflicts with exists table' when I try to rename to the same name and changing to capital letter. Any ideas how to solve this?
也许有一个选项可以告诉Amazon RDS忽略表名称和表字段的大写字母.
Maybe there is an option to tell Amazon RDS to ignore table name and table field's capitalization.
推荐答案
修改mysql的my.ini并更改lower_case_table_names并重新启动mysql
modify your my.ini of mysql and change lower_case_table_names and restart mysql
lower_case_table_names=1
在Amazon RDS参数组上,使用值'1'.
On Amazon RDS Parameter Group use the value '1'.
在常规的MySQL安装中,使用值'2'.
On regular MySQL installation, use the value '2'.
有关更多信息,请阅读这篇精美的文章 http://www. kulawik.de/blog/2011/02/lower_case_table_names/
for more information you can go through with this nice article http://www.kulawik.de/blog/2011/02/lower_case_table_names/
这篇关于将Amazon RDS表名称重命名为大写字母会引发错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!