Lower_case_table_names of the MySQL parameter
Lower_case_table_names parameter MySQL database table case. Default is 0.
0 database table is sensitive, case-sensitive, and the specified case saves the file
1 the library table is insensitive, case-insensitive, and the file system is saved in lowercase
2 Save the file in the case specified by the create statement, but MySQL will convert it to lowercase and log warning when starting
Parameter is adjusted from 0 to 1
Operation database tables are sensitive when lower_case_table_names = 0.
Mysql > create database wx;Query OK, 1 row affected (0.01 sec) mysql > create database WX;Query OK, 1 row affected (0.00 sec) mysql > use wx;Database changedmysql > show tables;Empty set (0.00 sec) mysql > create table wx (id int); Query OK, 0 rows affected (0.01 sec) mysql > create table WX (id int); Query OK, 0 rows affected (0.01 sec)
Adjust parameter lower_case_table_names = 1
At this point: both tables have table information. Although there are now two libraries, tables are created in one library and tables also appear in the other.
Mysql > use wx;Reading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with-ADatabase changedmysql > show tables;+-+ | Tables_in_wx | +-+ | WX | | wx | +-+ 2 rows in set (0.00 sec) mysql > use WX Reading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with-ADatabase changedmysql > show tables;+-+ | Tables_in_wx | +-+ | WX | | wx | +-+ 2 rows in set (0.00 sec)
Operation under the parameter lower_case_table_names = 1
Mysql > create database ww;Query OK, 1 row affected (0.01 sec) mysql > create database WW;ERROR 1007 (HY000): Can't create database 'ww'; database existsmysql > use ww;Database changedmysql > create table ww (id int); Query OK, 0 rows affected (0.01 sec) mysql > create table WW (id int); ERROR 1050 (42S01): Table' ww' already exists
The parameter is adjusted from 0 to 1, and the change data file is only stored in a lowercase library.
[root@wxtest WX] # lsdb.opt [root@wxtest wx] # lsdb.opt t1.frm t1.ibd wx.frm WX.frm wx.ibd WX.ibd