Maintain case sensitivity when importing db into windows

user103219 picture user103219 · May 20, 2010 · Viewed 9.7k times · Source

I have an export from a MYSQL database on a linux machine however when importing that database into MYSQL on windows all of the table names that were camel cased are now all lower case. The sql dump has the correct case in it but the importing via phpmyadmin seams to remove these.

How can I import it and keep the case?

Answer

JYelton picture JYelton · May 20, 2010

There is a setting for mysql to allow case differentiation in windows. You need to edit the my.cnf file and alter the setting:

lower_case_table_names=2

Then restart mysql.

Otherwise, this may be a case of phpmyadmin changing case in the way it passes queries to the server rather than a linux-to-windows problem. Have you tried importing the sql dump using another mysql manager such as SQLyog? (Tools -> Restore from SQL Dump...)