当前位置:网站首页> 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不区分大小写内容请搜索软件开发网以前的文章或继续浏览下面的相关文章希望大家以后多多支持软件开发网!
边栏推荐
- 机试刷题1
- Balanced Multimodal Learning via On-the-fly Gradient Modulation(CVPR2022 oral)
- hdu 5077 NAND(暴力打表)
- Balanced Multimodal Learning via On-the-fly Gradient Modulation(CVPR2022 oral)
- DockerMySQL无法被宿主机访问的问题解决
- [unity] upgraded version · Excel data analysis, automatically create corresponding C classes, automatically create scriptableobject generation classes, and automatically serialize asset files
- Matlab tips (27) grey prediction
- Interview question: AOF rewriting mechanism, redis interview must ask!!!
- 让我们,从头到尾,通透网络I/O模型
- Les entreprises ne veulent pas remplacer un système vieux de dix ans
猜你喜欢
Traversal of a tree in first order, middle order, and then order
树的先序中序后序遍历
mysql连接vscode成功了,但是报这个错
Word2vec (skip gram and cbow) - pytorch
Financial professionals must read book series 6: equity investment (based on the outline and framework of the CFA exam)
Introduction to network basics
ICLR 2022 | pre training language model based on anti self attention mechanism
ICLR 2022 | 基于对抗自注意力机制的预训练语言模型
机试刷题1
Balanced Multimodal Learning via On-the-fly Gradient Modulation(CVPR2022 oral)
随机推荐
存币生息理财dapp系统开发案例演示
Bipartite graph determination
uniapp设置背景图效果demo(整理)
#DAYU200体验官# 在DAYU200运行基于ArkUI-eTS的智能晾晒系统页面
Traversal of a tree in first order, middle order, and then order
Financial professionals must read book series 6: equity investment (based on the outline and framework of the CFA exam)
BasicVSR_PlusPlus-master测试视频、图片
MySQL中正则表达式(REGEXP)使用详解
CSDN 上传图片取消自动加水印的方法
Balanced Multimodal Learning via On-the-fly Gradient Modulation(CVPR2022 oral)
Const keyword
DevSecOps软件研发安全实践——发布篇
Demonstration of the development case of DAPP system for money deposit and interest bearing financial management
Sword finger offer question brushing record 1
Aardio - Method of batch processing attributes and callback functions when encapsulating Libraries
Void keyword
Aardio - integrate variable values into a string of text through variable names
What are the specific steps and schedule of IELTS speaking?
dockermysql修改root账号密码并赋予权限
机试刷题1