Rename Amazon RDS table name to capital letter throws error

大憨熊 提交于 2019-12-01 22:20:31

问题


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.

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?

Maybe there is an option to tell Amazon RDS to ignore table name and table field's capitalization.


回答1:


modify your my.ini of mysql and change lower_case_table_names and restart mysql

lower_case_table_names=1

On Amazon RDS Parameter Group use the value '1'.

On regular MySQL installation, use the value '2'.

for more information you can go through with this nice article http://www.kulawik.de/blog/2011/02/lower_case_table_names/



来源:https://stackoverflow.com/questions/19654488/rename-amazon-rds-table-name-to-capital-letter-throws-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!