I have created a database that has many scripts and many sprocs, in this db we have not paid attention to worrying about case sensitivity as it was off for my local development machine.
With all of this said, I am trying to figure out how to make the following 2 statements return the same result.
SELECT * FROM companies
SELECT * FROM Companies
Currently the lowercase one doesn't return anything and says that there isn't that table in the schema.
There is a variable called lower_case_table_names in my.cnf file which can be set as lower_case_table_names=1 to make the mysql table incasesensitive.
To do this in Linux below are the steps:
Open terminal and edit /etc/mysql/my.cnf
sudo nano /etc/mysql/my.cnf Underneath the [mysqld] section.add if not present in the cnf file:
lower_case_table_names = 1
Restart mysql
sudo /etc/init.d/mysql restart
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With