当前位置:网站首页> docker mysql5.7如何设置不区分大小写
docker mysql5.7如何设置不区分大小写
2022-07-06 15:38:00 【1024问】
进入容器后
mysql 配置文件是放在 /etc/mysql/mysql.conf.d/mysqld.cnf,
vim /etc/mysql/mysql.conf.d/mysqld.cnf 在 [mysqld] 下加入一行: lower_case_table_names=1
或
docker run -p 3306:3306 --name mymysql -v $PWD/conf:/etc/mysql/conf.d -v $PWD/logs:/logs -v $PWD/data:/mysql_data -e MYSQL_ROOT_PASSWORD=123456 -d mysql:5.7 --lower_case_table_names=1
在宿主机改好
[mysqld]#不区分大小写lower_case_table_names=1lower_case_table_names=1pid-file = /var/run/mysqld/mysqld.pidsocket = /var/run/mysqld/mysqld.sockdatadir = /var/lib/mysql#log-error = /var/log/mysql/error.log# By default we only accept connections from localhost#bind-address = 127.0.0.1# Disabling symbolic-links is recommended to prevent assorted security riskssymbolic-links=0
也可以在宿主机改好用docker命令cp到容器里面
docker cp mysqld.cnf mysql:/etc/mysql/mysql.conf.d/mysqld.cnf
重启mysql容器
docker restart mysql
保存,退出容器;
执行sudo docker restart MySQL ,重启MySQL即可查看:
show global variables like '%lower_case%';+------------------------+-------+| Variable_name | Value |+------------------------+-------+| lower_case_file_system | OFF || lower_case_table_names | 1 |+------------------------+-------+2 rows in set (0.00 sec)
到此这篇关于docker mysql5.7如何设置不区分大小写的文章就介绍到这了,更多相关docker mysql5.7不区分大小写内容请搜索软件开发网以前的文章或继续浏览下面的相关文章希望大家以后多多支持软件开发网!
边栏推荐
- BasicVSR_PlusPlus-master测试视频、图片
- 企業不想換掉用了十年的老系統
- Mysql 身份认证绕过漏洞(CVE-2012-2122)
- 面试题:AOF重写机制,redis面试必问!!!
- Custom swap function
- uniapp滑动到一定的高度后固定某个元素到顶部效果demo(整理)
- Enterprises do not want to replace the old system that has been used for ten years
- Pytest unit test series [v1.0.0] [pytest execute unittest test case]
- 【无标题】
- How to choose the server system
猜你喜欢
#DAYU200体验官# 在DAYU200运行基于ArkUI-eTS的智能晾晒系统页面
【Unity】升级版·Excel数据解析,自动创建对应C#类,自动创建ScriptableObject生成类,自动序列化Asset文件
DockerMySQL无法被宿主机访问的问题解决
Dayu200 experience officer runs the intelligent drying system page based on arkui ETS on dayu200
(flutter2) as import old project error: inheritfromwidgetofexacttype
Children's pajamas (Australia) as/nzs 1249:2014 handling process
Enterprises do not want to replace the old system that has been used for ten years
Efficient ETL Testing
Hard core observation 545 50 years ago, Apollo 15 made a feather landing experiment on the moon
On file uploading of network security
随机推荐
mysql查看表结构的三种方法总结
#DAYU200体验官# 首页aito视频&Canvas绘制仪表盘(ets)
Is there any requirement for the value after the case keyword?
Hard core observation 545 50 years ago, Apollo 15 made a feather landing experiment on the moon
[unity] upgraded version · Excel data analysis, automatically create corresponding C classes, automatically create scriptableobject generation classes, and automatically serialize asset files
dockermysql修改root账号密码并赋予权限
Improving Multimodal Accuracy Through Modality Pre-training and Attention
[IELTS speaking] Anna's oral learning record part1
(shuttle) navigation return interception: willpopscope
POJ 1258 Agri-Net
None of the strongest kings in the monitoring industry!
欧洲生物信息研究所2021亮点报告发布:采用AlphaFold已预测出近1百万个蛋白质
Chapter 19 using work queue manager (2)
Extern keyword
[step on pit collection] attempting to deserialize object on CUDA device+buff/cache occupy too much +pad_ sequence
Jafka来源分析——Processor
asp读取oracle数据库问题
Enterprises do not want to replace the old system that has been used for ten years
three. JS gorgeous bubble effect
NFTScan 开发者平台推出 Pro API 商业化服务