Php – How to disable case sensitivities in MySQL by a run time script in PHP

case-insensitivecase-sensitiveMySQLPHP

I had to import a MySQL backup from a Windows server to a Linux server. As table names were in both upper and lower case in the previous database, I have problem right now because in current server (Linux) settings are case insensitive mode for MySQL. Also I can not change its settings because it's a shared hosting and I dont have access to it.
How can I force MySQL to run in case insensitive mode using a run time script in PHP?

Best Answer

i think you can use this code for rename that or use on the fly:

select concat('rename table ', table_name, ' to ' , lower(table_name) , ';') from information_schema.tables where table_schema = 'your_schema_name';

SELECT * from lower(table_name) ...