1

I have a problem. I'm using Windows at work to develop but the server is Linux. I often work with database queries.

Now, I often type the table name in wrong caps (like, in lowercase if first 3 characters are uppercase). How can I turn case sensitivity on Windows on?

I currently have tried putting

lower_case_table_names=1

After

interactive-timeout

And I've also tried putting

lower_case_table_names=0

After

interactive-timeout

None of them work though and my script still works fine on Windows where it would bug in Linux.

Joshua Bakker
  • 2,288
  • 3
  • 30
  • 63
  • hello, had you find a solution on windows, when putting lower_case_table_names=0 mysql server not restar!? – zedtimi May 23 '19 at 10:13

1 Answers1

0

Its due to Linux file system. Every Table created in database create a corresponding file on linux system. linux file system is case sensitive we know. So in SQL query table name needs to be case sensitive for Linux.

Already answered here :

Are table names in MySQL case sensitive?

In MySQL, databases correspond to directories within the data directory. Each table within a database corresponds to at least one file within the database directory. Consequently, the case sensitivity of the underlying operating system plays a part in the case sensitivity of database and table names.

  • But I can't achieve case sensitivity on Windows then? – Joshua Bakker Aug 18 '17 at 14:42
  • This is not possible as far as i understand the [MySQL-reference](https://dev.mysql.com/doc/refman/5.7/en/identifier-case-sensitivity.html) – MatSnow Aug 18 '17 at 15:02
  • i dont know if you understand well, few lines from mySql reference "the case sensitivity of the underlying operating system plays a part in the case sensitivity of database, table, and trigger names. This means such names are not case sensitive in Windows, but are case sensitive in most varieties of Unix. " – jeetendra Mandal Aug 18 '17 at 18:08