Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rename Amazon RDS table name to capital letter throws error

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.

like image 645
Idan Shechter Avatar asked Oct 29 '13 09:10

Idan Shechter


People also ask

Is RDS case-sensitive?

Because Amazon RDS uses a case-sensitive file system, setting the value of the lower_case_table_names server parameter to 2 ("names stored as given but compared in lowercase") is not supported.

What are some of the common causes why you Cannot connect to a DB instance on AWS?

When you can't connect to a DB instance, the following are common causes: Inbound rules – The access rules enforced by your local firewall and the IP addresses authorized to access your DB instance might not match. The problem is most likely the inbound rules in your security group.

How do I troubleshoot an RDS instance?

Troubleshoot database level issuesBe sure that you're using the correct user name and password to access the instance from your DB client. Be sure that the user has the database permissions to connect to the DB instance. Check for any resource throttling in Amazon RDS, such as CPU or memory contention.


1 Answers

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/

like image 188
5 revs Avatar answered Oct 08 '22 10:10

5 revs