当前位置:网站首页>如何让mysql不区分大小写
如何让mysql不区分大小写
2022-06-21 07:27:00 【亿速云】
如何让mysql不区分大小写
今天小编给大家分享一下如何让mysql不区分大小写的相关知识点,内容详细,逻辑清晰,相信大部分人都还太了解这方面的知识,所以分享这篇文章给大家参考一下,希望大家阅读完这篇文章后有所收获,下面我们一起来了解一下吧。
让mysql不区分大小写的方法:1、进入mysql的安装目录,找到并打开配置文件“my.ini”;2、在配置文件的最后一行加上“lower_case_table_names=1”语句,设置大小写敏感参数“lower_case_table_names”,让mysql对大小写不敏感;3、重启mysql服务即可。
本教程操作环境:windows7系统、mysql8版本、Dell G3电脑。
让mysql不区分大小写的方法
mysql大小写敏感配置与两个参数相关 —— lower_case_file_system 和 lower_case_table_names
lower_case_file_system:表示当前系统文件是否大小写敏感(ON为不敏感,OFF为敏感),只读参数,无法修改。
lower_case_table_names:表示表名是否大小写敏感,可以修改。
lower_case_file_system参数无法修改,因此只能利用lower_case_table_names参数来让mysql不区分大小写。
步骤:
1、进入mysql的安装目录,找到并打开配置文件my.ini

2、在配置文件最后一行加上下面一句话
lower_case_table_names=1
lower_case_file_system说明是否数据目录所在的文件系统对文件名的大小写敏感
0:区分大小写
1:不区分大小写

3、重启mysql服务即可。
注意事项:
将默认的lower_case_tables_name为0设置成1,需先将已经存在的库表名转换为小写:
1)针对仅表名存在大写字母的情况:
①、lower_case_tables_name=0时,执行rename table成小写。
②、设置lower_case_tables_name=1,重启生效。
2)针对库名存在大写字母的情况:
①、lower_case_tables_name=0时,使用mysqldump导出,并删除老的数据库。
②、设置lower_case_tables_name=1,重启生效。
③、导入数据至实例,此时包含大写字母的库名已转换为小写。
以上就是“如何让mysql不区分大小写”这篇文章的所有内容,感谢各位的阅读!相信大家阅读完这篇文章都有很大的收获,小编每天都会为大家更新不同的知识,如果还想学习更多的知识,请关注亿速云行业资讯频道。
边栏推荐
- Four necessary steps for building a digital factory
- QML control type: drawer
- 微信小程序_5,页面配置
- Market trend report, technical innovation and market forecast of inorganic microporous adsorbents in China
- Google Earth Engine(GEE)——全球农田有机土壤碳和氮排放(1992-2018年度)数据集
- 數據分析之:不同行業的常見指標
- Can customer managers be relied on online? Is the fund safe
- Life cycle of kubernetes pod
- Kubernetes cluster setup detailed tutorial
- Open up the connection between production and marketing and build a new digital supply chain of agricultural and sideline products
猜你喜欢

Wechat applet_ 6. Network data request
![[OSG] OSG development (02) - build osgqt Library Based on MinGW compilation](/img/f4/9137bb7f8eab1b99460cb4110fa787.png)
[OSG] OSG development (02) - build osgqt Library Based on MinGW compilation

Hisilicon series mass production hardware commissioning record

What is Eureka? What can Eureka do? How does Eureka work?

flutter jpush

AdEx 治理投票:质押奖励减半

Wechat applet_ 3. Wxml template syntax

ADEX governance voting: pledge reward halved

什么是Eureka?Eureka能干什么?Eureka怎么用?

微信小程序_6,网络数据请求
随机推荐
Minesweeping - C language - Advanced (recursive automatic expansion + chess mark)
QML控件类型:Drawer
Getting started with MATLAB
Eigen common operations
Introduction to missing data filling dataset (2) -- Introduction to multiple datasets and dataset preprocessing (mushroom, news, spam, wine red and year)
Realize the industry vision of decentralization, safety, accuracy and real-time price feeding
Singleton mode in multithreaded environment
thinkphp的这些扩展插架你都知道吗?
flutter jpush
海思系列量产硬件调试记录
Introduction to missing data filling dataset (1) -- Introduction to multiple datasets and dataset preprocessing (beast, covertype, credit, EEG, iris and letter)
Hisilicon series mass production hardware commissioning record
QML control type: drawer
SQL advanced challenge (26 - 30)
如何利用MES管理系统实现防错和预警
Wechat applet_ 6. Network data request
Is the account with low commission safe? Is there a shortage of funds
Market trend report, technical innovation and market forecast of inorganic microporous adsorbents in China
微信小程序_3,WXML模板语法
Data analysis part: common indicators of different industries