Note that there are some explanatory texts on larger screens.

plurals
  1. POMySQL Lowercase Table Names in Windows Uppercase names on Unix
    text
    copied!<p>I have a a problem whereby my production server runs Unix and my dev server runs MS Windows. The problem is that Windows is not case sensitive and Unix is. So my table set on the production server uses Uppercase table names ie "Customers" and on Windows the table names are in lowercase "customers".</p> <p>All this is fine until you need to get data from one box to another and your SQL export says insert into "customers" in lowercase, and presto "Unkown table customers". Because the production server is currently on a shared hosting plan i cant change the settings and install the key that ignores case.</p> <p>So my question, is there a way to get Windows to convert the tables back to the correct case or is there some setting I can include in the export SQL file so that i can upload data without this problem.</p> <p>Thanks </p> <p>UPDATE</p> <p>Here is what I discovered for anybody else having this issue.</p> <p>If you have already set up your tables running MySQL on Windows adding lower_case_table_names=2 to your my.cnf or my.ini file will not change the case of your tables automatically even if they were originally created using uppercase or mixed case names.</p> <p><strong>CREATE TABLE</strong> "MyTable" will create a new table "mytable" <strong>not</strong> "MyTable" even when lower_case_table_names=2 is set in your my.cnf file. </p> <p>To get around this problem use this method</p> <ol> <li>Make a copy of your original table </li> <li>Drop your original table</li> <li><strong>Rename</strong> your copy table using the correct case.</li> </ol> <p>This is the only way it will work. Hope this helps somebody. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload