当前位置:网站首页> 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不区分大小写内容请搜索软件开发网以前的文章或继续浏览下面的相关文章希望大家以后多多支持软件开发网!
边栏推荐
- 允许全表扫描 那个语句好像不生效set odps.sql.allow.fullscan=true;我
- 关于声子和热输运计算中BORN电荷和non-analytic修正的问题
- How big is the empty structure?
- MATLAB小技巧(27)灰色预测
- DR-Net: dual-rotation network with feature map enhancement for medical image segmentation
- QT signal and slot
- hdu 5077 NAND(暴力打表)
- Children's pajamas (Australia) as/nzs 1249:2014 handling process
- 机试刷题1
- CUDA exploration
猜你喜欢
Dockermysql modifies the root account password and grants permissions
浅谈网络安全之文件上传
[compilation principle] LR (0) analyzer half done
【Unity】升级版·Excel数据解析,自动创建对应C#类,自动创建ScriptableObject生成类,自动序列化Asset文件
[launched in the whole network] redis series 3: high availability of master-slave architecture
Method of canceling automatic watermarking of uploaded pictures by CSDN
How to choose indoor LED display? These five considerations must be taken into account
欧洲生物信息研究所2021亮点报告发布:采用AlphaFold已预测出近1百万个蛋白质
Custom swap function
Thinkphp5 multi table associative query method join queries two database tables, and the query results are spliced and returned
随机推荐
Const keyword
(flutter2) as import old project error: inheritfromwidgetofexacttype
Demonstration of the development case of DAPP system for money deposit and interest bearing financial management
MATLAB小技巧(27)灰色预测
BasicVSR_ Plusplus master test videos and pictures
The problem that dockermysql cannot be accessed by the host machine is solved
Signed and unsigned keywords
Let's see through the network i/o model from beginning to end
MySQL中正则表达式(REGEXP)使用详解
Flutter life cycle
Case recommendation: An Qing works with partners to ensure that the "smart court" is more efficient
UDP programming
Cocoscreator+typescripts write an object pool by themselves
Project duplicate template
How does crmeb mall system help marketing?
The application of machine learning in software testing
On file uploading of network security
memcached
Detailed explanation of ThreadLocal
Some suggestions for foreign lead2022 in the second half of the year