mysqlphpmyadminmysqlimport

Maintain case sensitivity when importing db into windows


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?


Solution

  • 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...)