- 0
- 0
- 约1.02千字
- 约 1页
- 2026-02-05 发布于浙江
- 举报
记mysql在配置⽂件修改max_connections后重启重置为214
总总结结::
mysql的max_connections数和本⾝操作系统的open-file-limit有关。
官⽅⽂档描述为
ThemaximumnumberofconnectionsMySQLcansupportdependsonthequalityofthethreadlibraryonagivenplatform,
theamountofRAMavailable,howmuchRAMisusedforeachconnection,theworkloadfromeachconnection,andthe
desiredresponsetime.Increasingopen-files-limitmaybenecessary.AlsoseeSection2.5,“InstallingMySQLonLinux”,
forhowtoraisetheoperatingsystemlimitonhowmanyhandlescanbeusedbyMySQL.
修修改改步步骤骤
1、修改/etc/security/limits.conf,添加
rootsoftnofile65535
roothardnofile65535
*softnofile65535
*hardnofile65535
2、修改/lib/systemd/system/mysql.service,添加
LimitNOFILE=65535
LimitNPROC=65535
(注:此处路径可能与系统有关,若不在/lib/systemd/system路径下可以确认是否存在于/usr/lib/systemd/system路径下)
3、执⾏命令
systemctldaemon-reload
systemctlrestartmysql.service
附附
还遇见了其它说法,apt、yum、rpm⽅式安装的mysql在对max_connection的限制也不同。
您可能关注的文档
最近下载
- 安全生产、文明施工责任目标分解..docx VIP
- 62安全生产文明施工责任目标分解.pdf VIP
- 五年级下册语文阅读题专项训练30篇 含答案.pdf VIP
- 企业数字化转型与客户体验优化.docx VIP
- 用于包壳靶管的充氦堵孔的电阻焊装置及焊接方法.pdf VIP
- 小麦仓储及配套设施建设可行性分析报告.docx VIP
- 新人教版数学五年级下册全册课本练习题精编可编辑可打印.doc VIP
- 基护笔试试题及答案.docx VIP
- 二年级数学寒假作业每日一练30天口算竖式应用题(30页).pdf VIP
- (高清版)B-T 10095.2-2023 圆柱齿轮 ISO齿面公差分级制 第2部分:径向综合偏差的定义和允许值.pdf VIP
原创力文档

文档评论(0)