当前位置:网站首页>如何让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不区分大小写”这篇文章的所有内容,感谢各位的阅读!相信大家阅读完这篇文章都有很大的收获,小编每天都会为大家更新不同的知识,如果还想学习更多的知识,请关注亿速云行业资讯频道。
边栏推荐
- Realize the industry vision of decentralization, safety, accuracy and real-time price feeding
- Introduction to missing data filling dataset (1) -- Introduction to multiple datasets and dataset preprocessing (beast, covertype, credit, EEG, iris and letter)
- EasyExcel-简介-01
- Hub, switch, router
- Deploy ZABBIX enterprise level distributed monitoring
- Product manager proficient in Axure tools
- MATLAB快速入门
- IDM mobile terminal function upgrade description
- [OSG] OSG development (02) - build osgqt Library Based on MinGW compilation
- 数学是用于解决问题的工具
猜你喜欢

win10上vs2017配置Eigen3开发环境

Easyexcel exclude display field-02

MATLAB快速入门

【osg】osg开发(02)—基于MinGW编译构建osgQt库

Digital twin smart server: information security monitoring platform

C # basic knowledge series 8 (const and readonly keywords)

传输层 TCP首部-序号和确认号

MATLAB 三维图(非常规)

Deploy ZABBIX enterprise level distributed monitoring

如何利用MES管理系统实现防错和预警
随机推荐
Grid search method
Eigen 常用操作
Why do smart cities need digital twins?
Use js to switch between clickable and non clickable page buttons
How to start wireless network service after win10 system installation
32单片机——pwm波输出
微信小程序_5,全局配置
QML control type: drawer
Detailed method and process of APP security penetration test
Yield Guild Games 与 Walken 达成合作
x86 CPU访问DRAM和PCI
[telnet] telnet installation and configuration
Necessary free artifact for remote assistance todesk remote control software (defense, remote, debugging, office) necessary remote tools
Analysis of source code encryption products
AutoCAD - drawing units and drawing boundaries
EasyExcel-简介-01
Google Earth Engine(GEE)——美国本土岩性数据集
A shell script to realize automatic expiration of Prometheus push gateway indicators
怎么看小程序是谁开发的(查看小程序开发公司方法)
[OSG] OSG development (03) -- build the osgqt Library of MSVC version