Logo
Logo
  • Home
  • Products
  • Writing
  • Work
  • Request Quote
Logo

Backed by 20+ years of hands-on software development expertise, mithra62 transforms ideas into powerful, reliable solutions—designed to work exactly how you want, every time.

  • Address

    Tucson, AZ 85712
  • Email

    eric@mithra62.com
  • Contact

    +1-310-739-3322

MySQL Case Sensitivity on Windows

  • Home
  • Writing
MySQL Case Sensitivity on Windows
30 Jan 09
  • Programming
  • Code
  • Servers

Here's a quick fix for a weird issue I ran into while working with MySQL on Windows.

MySQL

The first time I moved code from my Windows box to one of my Linux servers I ran into an error about a MySQL table not existing in one of my queries. I checked the table and the code to verify everything was as it should be and noticed that all my tables were lowercase instead of CamelHumped. Odd....

Here's the SQL:

$sql = "SELECT * FROM TableName WHERE id = '".$DB->es($id)."'";

It turns out that MySQL on Windows will convert all tables created to a lowercase name. To remain consistent with Linux you should add the below to your my.cnf file:

set-variable=lower_case_table_names=0

Adding the above line will preserve the naming conventions between both platforms.

Recent Post

  • I'm Speaking! (...again...)
    I’m Speaking! (...again…)
    27 Apr, 2022
  • Guess I Better Start Contributing (...again...)
    Guess I Better Start Contributing (...again…)
    19 Apr, 2022
  • Hello World (... again...)
    Hello World (... again…)
    04 Apr, 2022

follow us

© Copyright 2025 | mithra62

  • Home
  • Products
  • Writing
  • Work
  • Request Quote