2

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?

2 Answers 2

4

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.

0

Why not just rename the table?

ALTER TABLE tableData RENAME TO tabledata;
2
  • Ok, But I have more than 100 tables.
    – Mokus
    Jun 17, 2011 at 8:59
  • Oh, fun... Perhaps write a quick script to do that for all tables? Probably a 30-minute job, depending on what scripting language you use. Or you might be able to stop the mysql server, rename the underlying tables, and start it again. I know that used to work for MyISAM tables; I'm not sure if that's possible with InnoDB.
    – Flimzy
    Jun 17, 2011 at 9:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .