Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

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.

share|improve this answer
add comment

Why not just rename the table?

ALTER TABLE tableData RENAME TO tabledata;
share|improve this answer
    
Ok, But I have more than 100 tables. –  run Jun 17 '11 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 '11 at 9:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.