简体   繁体   中英

Windows MySQL case sensitive

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM