0

In my mysql db, i have a table called customer

In my local test environment mysql db, I can do select * from Customer but when my code is rolled out to a production environment for clients to use, select * from customer throws syntax error.

This is because the production environment mysql db is case sensitive.

How do i change my local enviorement mysql to be case sensitive?

Thanks!

Jacel
  • 307
  • 4
  • 10
  • 24

1 Answers1

0

You can add (or change) this system variable to the bottom of my.ini and restart mysql:

my.ini:

lower_case_table_names=2

lower_case_table_names 2

Table and database names are stored on disk using the lettercase specified in the CREATE TABLE or CREATE DATABASE statement, but MySQL converts them to lowercase on lookup. Name comparisons are not case sensitive. This works only on file systems that are not case-sensitive! InnoDB table names are stored in lowercase, as for lower_case_table_names=1.

ScaisEdge
  • 131,976
  • 10
  • 91
  • 107