In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "MySQL case-sensitive problem analysis". In daily operation, I believe many people have doubts about MySQL case-sensitive problem analysis. The editor consulted all kinds of data and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "MySQL case-sensitive problem analysis". Next, please follow the editor to study!
0 lower_case_file_system
This parameter is used to describe whether the operating system where the data directory resides is case-sensitive. This parameter is of type bool but cannot be modified.
0-case sensitive
1-case insensitive
For example, those who run on linux are all OFF or 0.
0 lower_case_table_names
This parameter is static and can be set to 0, 1, 2.
0-case sensitive. (default for Unix,Linux)
The created library table is saved as is on disk. For example, create database TeSt; will create a TeSt directory, create table AbCCC. AbCCC.frm will be generated as is.
The SQL statement is also parsed as is.
1-case insensitive. (default for Windows)
When creating library tables, MySQL converts all library table names to lowercase and stores them on disk.
The SQL statement also converts the library table name to lowercase.
If you need to query the previously created Test_table (generate Test_table.frm file), even if you execute select * from Test_table, it will be converted to select * from test_table, so that the error table does not exist.
2-case insensitive (OS X default)
The created library table is saved as is on disk.
However, the SQL statement converts the library table name to lowercase.
Common hidden dangers caused by modifying lower_case_table_names:
If you create a library table with uppercase letters during lower_case_table_names=0 and change it to lower_case_table_names=1, it will not be found.
Note:
If you set the default lower_case_tables_name to 0 to 1, you need to convert the existing library table name to lowercase:
1) for cases where only uppercase letters exist in the table name:
When ① or lower_case_tables_name=0, the rename table is executed in lowercase.
②, set lower_case_tables_name=1, and restart takes effect.
2) for the case where uppercase letters exist in the library name:
When ①, lower_case_tables_name=0, use mysqldump to export and delete the old database.
②, set lower_case_tables_name=1, and restart takes effect.
③, import data to the instance, and the library name containing uppercase letters has been converted to lowercase.
At this point, the study of "MySQL case-sensitive problem Analysis" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.