当前位置:网站首页>Increase the maximum number of MySQL connections
Increase the maximum number of MySQL connections
2022-06-12 15:06:00 【Ape fly】
1. Errors occurred
Too many connections
2. reason
One reason is MySQL In profile max_connections It's too small . Another reason , That is, the number of visits to the server is too high ,MySQL Server can't resist .
3. First determine the of the current machine mysql Is the maximum number of connections
show variables like '%max_connections%';
4. Set the maximum number of connections
4.1. Temporary settings are valid
set GLOBAL max_connections=1024;Then go and check , See if it works
show variables like '%max_connections%';Pay attention , This way of setting , once mysql After restart , In this way mysql Directly set variables will fail .
4.2. Permanent settings are valid
modify mysql The configuration file my.cnf, stay [mysqld] Section max_connections value .
max_connections=1024
After saving the configuration file , restart mysql that will do .
5. Enter server , View the number of accesses through the port
netstat -an | grep 3306 | grep ESTABLISHED | wc -l
6. You can also view the specific number of connections
show processlist;
Reference resources :MySQL: ERROR 1040: Too many connections - Simple books
边栏推荐
- Thinking: what is asynchrony and thread safety
- SQL cross database injection
- Ngork implements intranet penetration -- free
- C语言打开中文路径文件
- xshell 7 官网免费下载
- 【LDA】LDA主题模型笔记—主要是狄利克雷
- 简单的爬虫框架:解析51job页面岗位信息
- idea 拉取分支代码
- Pta: self test -3 array element cyclic right shift problem (20 points)
- Producers (send syncask requests) and consumers (with xxxask monitoring and Implementation)
猜你喜欢

Kinect2.0+ORBSLAM2_ with_ pointcloud_ map

基于TensorRT的深度学习模型部署实战教程!

Pta: self test -2 prime pair conjecture (20 points)

Assertion of selenium webdriver

ROS初学者编写小乌龟以一定速度旋转一定角度的server

Pointer related concepts

New关键字、引用&与指针的学习记录

解决log4j2漏洞遭到挖矿、僵尸进程病毒攻击

Qiming Zhixian shares the application scheme of 2.8-inch handheld central control screen

Use of boost:: bind() in ROS
随机推荐
leetcode每日一题-公平的糖果棒交换
The process of generating strong association rules from frequent itemsets
SQL cross database injection
粒子滤波学习记录
【Calendar】1. For globalization 2 But only date can be formatted by SDF 3 Month to -1 4 Week from Sunday is the first day
Installation and use of mat
Process abstraction of program construction and interpretation
C语言打开中文路径文件
交换数字,异或求单,操作符相关
Jenkins' RPC test project
Is it safe to open an account for flush mobile stock trading
JUnit exception, a method that asserts that the exception information is not empty
TF learning notes in ROS
C data type
Function related matters
Left aligned, right aligned, random number, goto, compare output bool
Ngork implements intranet penetration -- free
同花顺手机炒股开户安全吗
C main函数
3D reconstruction system | L3 incremental motion recovery structure (incremental SFM)