Mysql case insensitive table names

case-insensitiveMySQL

I had two database, one on windows server, and one on linux server, I moved the database to the linux server, but I faced wit a problem, On windows when a made a selection foe example

SELECT * FROM tabledata

Worked fine.

but linux it's not working, because the original table names is tableData

Is there any way to configuration the mysql to case-insensitive?

Best Answer

A prime example of screwed up cross-plattform design. From the MySQL documentation on this point:

the case sensitivity of the underlying operating system plays a part in the case sensitivity of database and table names. This means database and table names are not case sensitive in Windows, and case sensitive in most varieties of Unix.

Fortunately, there is the lower_case_table_names configuration directive, which, when set to 2, would disable case sensitivity for comparisons.