当前位置:网站首页>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 ~
边栏推荐
猜你喜欢

Building a cluster: and replacing with error

Box model border

Detailed explanation of iSCSI (V) -- actual operation of iSCSI client configuration

Flink CheckPoint : Exceeded checkpoint tolerable failure threshold
软件测试需求分析方法有哪些,一起来看看吧

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

Background color translucent

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

数据库不知道哪里出问题

Composition of box model
随机推荐
day5-x
第六章-包含多个段的程序
Visualization of two-dimensional feature logistic regression prediction results
consul 配置相关
Notes used by mqtt (combined with source code)
Basic knowledge of Linear Algebra -- concepts and relationships of common matrices
POI library update excel picture
Can you migrate backwards before the first migration in the south- Can you migrate backwards to before the first migration in South?
[computer use] how to change a computer disk into a mobile disk?
[untitled] task3 multiple recall
Analysis of 43 cases of MATLAB neural network: Chapter 7 regression of RBF Network -- Realization of nonlinear function regression
mySql学习记录——二、mySql建表命令
Building a cluster: and replacing with error
RuntimeError:Input and parameter tensors are not at the same device, found input tensor at cuda:0 an
[character set 9] will GBK be garbled when copied to unicode?
Exists usage in SQL
IDEA新版UI申请方法+无测试资格使用方法及相关介绍
[character set 8] char8_ t、char16_ t、char32_ t、wchar、char
Composition of box model
Jenkins pipeline syntax