How to allow case sensitive names in Mysql on Windows
Have you ever faced problem related to keep table Name as Capital ?
On most of the Windows OS and Server OS, if you will try to keep a table name Users , Mysql will auto convert the name from Users to users (U becomes Small rather than Capital Letter).
To fix this issue, to have to change the mysql configuration. To do this follow the following steps
- Goto your Mysql Setup folder
- In case of XAMPP / WAMP / LAMP, goto mysql folder
- Then inside bin folder you will a file called my.ini
- Open that file in an editor
- Add the following line any where as you which
Here 2 means allow case sensitive names in Mysql and 1 means keep every thing as Case-insensitive.
Now restart the Mysql service and Now if you rename the table from users to Users, then mysql will keep the name as Capital.
You are bound to write queries in your PHP / JAVA / .Net / Node.JS as proper table and column case names other wise mysql will throw not found errors.