Mysql Case sensitivity
Problem:
When you create a mysql table, whether it is in upper or lower case, it is changed to lower case after the table is created.
Cause:
MySQL is case-insensitive in windows. After the script file is imported into MySQL, the table name is automatically converted to lowercase.
Solution: (based on the windows System)
Find the my. ini file in the mysql installation directory and add it to the file (1 indicates case insensitive and 2 indicates case sensitive)
1 lower_case_table_names = 2
Restart mysql and run the following command on the cmd command line:
1 net stop mysql2 net start mysql
Then, on the mysql command interface, enter:
Show variables like '% low % ';
It is case sensitive.
In addition, when you use Navcat to execute an SQL script, you may also encounter a problem: it is clear that all script statements are executed with uppercase table names, but after the script is created, some table names have been changed to lower-case format.
For example: (the reason why a strange lowercase table name suddenly appears in all upper-case tables is unknown)
Solution,
1. Manually use the command to change.
1 rename table t_meeting to t_m; 2 rename table t_m to T_MEETING;
2. Find the data file and rename it directly:
File Path: C: \ ProgramData \ MySQL Server 5.5 \ data
Find the corresponding database and rename the corresponding table, because the Navcat rename seems to have no effect, it may be a problem with my version, so it is not recommended to directly use Navcat to modify it.
================