问题
I wrote
select * from mytable
In my ASP.net app on Windows it works fine. On Linux it complains I used mytable instead of MyTable. How do I set MySQL on Windows to be case sensitive or set Linux to be case insensitive when dealing with table names?
回答1:
See 8.2.2. Identifier Case Sensitivity in the mySQL manual.
Short version: Use the lower_case_table_names system variable to achieve case insensitivity on Linux/Unix.
回答2:
There is a setting for this. See this link: http://www.parkroad.co.za/blog/2007/02/07/mysql-case-sensitivity-of-table-names-between-windows-and-linux-systems
Here's the important part: ...you can look for the setting: lower_case_table_names in your my.ini file, found in or around: C:\Program Files\MySQL\MySQL Server 4.1, depending on which version you are running. If you don't find the setting, you can just add it to the end of the my.ini file, as I did, like so:
lower_case_table_names=0
Dan
来源:https://stackoverflow.com/questions/8438286/make-mysql-case-sensitive