Tags: Linux , MySQL , Windows
This will be a short one today as I have been dealing with both hardware and software problems for the last few days.
Windows vs Linux Case Sensitivity
If you often work with MySQL on both windows and linux you may find yourself getting tripped up by a little difference between the way Windows and Linux MySQL handle case sensitivity. On MySQL databases running on Linux table names are cases sensitive, while on Windows table names are case insensitive and normally forced lowercase.
This can potentially cause a problem if you are developing an MySQL driven application on a windows box (ie your laptop) but intend to deploy it to a Linux box.
Changing MySQL Case Sensitivity on Windows
Resolving this is actually very simple. All you need to do is edit the my.cnf file and set/add the following entry. For my default mysql install "my.cnf" was located at "c:\program files\mysql\mysql server[version]\my.cnf"
#Ensure that table names are stored case sensitive and that queries are case sensitive when naming a table
lower_case_table_names=0
Lower Case Levels
The above statement has three possible settings 0,1 & 2. Below is a brief explanation of each.
| Level | Description | Default for OS |
|---|---|---|
| 0 | Database and Table names are stored case sensitive. Tables names in queries are also case sensitive. | Linux |
| 1 | Database and Table names are stored lowercase. Table names in queries are not case sensitive (converted to lowercase on execution). | Windows |
| 2 | Database and Table names are stored case sensitive. Tables names in queries are not case sensitive. Only possible for non case sensitive file systems (ie windows). |
For more information visit the MySQL Docs.
Archives Blog Listing
- 2012
- May
- April
- March
- February
- January
- 2011
- December
- November
- September
- August
- July
- June
- Understanding The Different CFC Instantiation Behaviours
- Dont Call Us PIIGS
- Be Careful With ColdFusion Date Validation
- CF9 CF8 Railo Multiserver Install Under JRUN
- Your Privacy vs Technology
- How To Install CouchDB On Slackware
- Fixing Retweet.js
- Programmers Put Down The Keyboard
- How To Create A Virtual CFIDE Directory Mapping In Apache
- May
- April
- March
- February
- January
- 2010
- December
- November
- October
- September
Tag Listing
- CFML
- Database
- Front End Design & Development
- Linux
- Other
- Tools & Testing