Search code examples
mysqlphpmyadminduplicatescase-sensitive

How to allow mysql to allow for same table names, just different letter case in windows


I have this mysql db, it has duplicate table names, just different lettercase. So when importing these tables to my windows xampp setup through phpmyadmin, mysql just ignores the imports with same table names. So I have these tables:

dealer
Dealer

I import dealer just fine, then when I import Dealer, mysql says table exists, and ignores the Dealer import all together.


Solution

  • When starting mysql, you must set the system variable lower_case_table_names to 0.

    On linux, , which uses a case-sensitive file system, you can do it.

    On Windows, which uses a case-insensitive file system, you can not do it, because windows can not distinguish between the two cases.

    See this documentation for details.