当前位置:网站首页> 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不区分大小写内容请搜索软件开发网以前的文章或继续浏览下面的相关文章希望大家以后多多支持软件开发网!
边栏推荐
- three. JS gorgeous bubble effect
- On file uploading of network security
- uniapp滑动到一定的高度后固定某个元素到顶部效果demo(整理)
- 关于声子和热输运计算中BORN电荷和non-analytic修正的问题
- Designed for decision tree, the National University of Singapore and Tsinghua University jointly proposed a fast and safe federal learning system
- Cloud native technology container knowledge points
- 安全保护能力是什么意思?等保不同级别保护能力分别是怎样?
- MySQL ---- first acquaintance with MySQL
- POJ 1258 Agri-Net
- OpenNMS separation database
猜你喜欢

Sword finger offer question brushing record 1

MySQL authentication bypass vulnerability (cve-2012-2122)
mysql拆分字符串作为查询条件的示例代码

View

How to choose indoor LED display? These five considerations must be taken into account

Designed for decision tree, the National University of Singapore and Tsinghua University jointly proposed a fast and safe federal learning system

European Bioinformatics Institute 2021 highlights report released: nearly 1million proteins have been predicted by alphafold

监控界的最强王者,没有之一!

DR-Net: dual-rotation network with feature map enhancement for medical image segmentation

专为决策树打造,新加坡国立大学&清华大学联合提出快速安全的联邦学习新系统
随机推荐
uniapp滑动到一定的高度后固定某个元素到顶部效果demo(整理)
MySQL ---- first acquaintance with MySQL
企业不想换掉用了十年的老系统
POJ 1258 Agri-Net
Cloud native technology container knowledge points
How to achieve text animation effect
QT信号和槽
hdu 5077 NAND(暴力打表)
poj 1094 Sorting It All Out (拓扑排序)
Dayu200 experience officer homepage AITO video & Canvas drawing dashboard (ETS)
How to use flexible arrays?
UDP programming
mysql查看表结构的三种方法总结
Some suggestions for foreign lead2022 in the second half of the year
Typescript get function parameter type
Puppeter connects to the existing Chrome browser
View
Unified Focal loss: Generalising Dice and cross entropy-based losses to handle class imbalanced medi
Designed for decision tree, the National University of Singapore and Tsinghua University jointly proposed a fast and safe federal learning system
Slide the uniapp to a certain height and fix an element to the top effect demo (organize)