当前位置:网站首页>Mysql database ignores case
Mysql database ignores case
2022-06-12 09:09:00 【Eden Garden】
The first thing we need to understand is :
Linux By default MySQL Databases are case sensitive ,
Windows By default MySQL The database is case insensitive .
1. View database case configuration
show variables like '%lower%';
±-----------------------±------+
| Variable_name | Value |
±-----------------------±------+
| lower_case_file_system | ON |
| lower_case_table_names | 0 |
±-----------------------±------+
2. Use root Permission to login , Modify the configuration file /etc/my.cnf
It should be noted that the location of the configuration file is not necessarily this , We are using docker When setting up the environment MySQL The default configuration file path for is :/etc/mysql/mysql.conf.d/mysqld.cnf, So we need to specify the path of the configuration file when modifying
3. In the configuration file [mysqld] Under the node , Join a row :
lower_case_table_names=1
4. restart MySQL :
systemctl restart mysqld.service
5. View database case configuration
show variables like '%lower%';
±-----------------------±------+
| Variable_name | Value |
±-----------------------±------+
| lower_case_file_system | OFF |
| lower_case_table_names | 1 |
±-----------------------±------+
Seeing the above information means that we have achieved success
One thing to note is that : When we set to ignore case , It is better not to have the name of the database case sensitive in the database , You can also try the specific reasons by yourself
( The table or database cannot be deleted or modified , Change the above configuration back to , This is also to avoid using case in the database or table when modifying the configuration )
Expand :
Deployed in docker In the environment MySQL How database ignores case
1、 We need to go into the already created docker In the container
docker exec -it mysql bash
2、 Use normal MySQL Order to enter MySQL
mysql -u root -p
3、 Repeat the above steps to modify the configuration file
vim /etc/mysql/mysql.conf.d/mysqld.cnf
4、 sign out , And restart MySQL service
docker restart mysql
I hope the above can help you , thank you ~
边栏推荐
- 2022 low voltage electrician retraining question bank and online simulation examination
- MySQL learning record - II. MySQL create table command
- Sword finger offer:[day 9 dynamic planning (medium)] --- > maximum sum of continuous subarrays
- Basic exercise letter graphics
- Grab screen and ground glass effect
- UMI packaging and subcontracting, and compressing to gzip
- Knowledge points of 2022 system integration project management engineer examination: project cost management
- Leetcode 336 palindrome pair (palindrome string + hash)
- Latex common symbols summary
- Building a cluster: and replacing with error
猜你喜欢

Summary of common character sets

第八章-数据处理的两个基本问题

最少换乘次数

xshell启动遇到“由于找不到mfc110.dll,无法继续执行代码的解决方法”

Flink CheckPoint : Exceeded checkpoint tolerable failure threshold

Introduction to applet cloud development -- questionnaire evaluation applet practice (7)

Machine learning notes - circular neural network memo list

Use NVM to dynamically adjust the nodejs version to solve the problem that the project cannot be run and packaged because the node version is too high or too low

【无标题】Task3 多路召回

43 cas d'analyse du réseau neuronal MATLAB: chapitre 7 régression du réseau RBF - - réalisation de la régression fonctionnelle non linéaire
随机推荐
【字符集九】gbk拷贝到Unicode会乱码?
[character set 8] char8_ t、char16_ t、char32_ t、wchar、char
2022 safety officer-c certificate special operation certificate examination question bank and simulation examination
Latex common symbols summary
Binary tree calculation problem
Detailed explanation of iSCSI (V) -- actual operation of iSCSI client configuration
2022 low voltage electrician retraining question bank and online simulation examination
Problems that cannot be resolved by tar command
第三章 寄存器 (内存访问)
Chapter 8 - two basic problems of data processing
Flink passes in custom parameters or profiles
网页中加载二次元3D虚拟主播源码(1:项目介绍和源码)
Offer:[day 8 dynamic planning (simple)] --- > maximum profit of stock
(十二)交互组件Selectable
Unittest test framework
Tool classes for extracting zip files
【sklearn学习】LightGBM
通俗理解时域采样与频域延拓
ABC253F Operations on a Matrix
ABC253F Operations on a Matrix