MySQL Variables back_log 数据库 参数变量解释及正确配置使用
2023-06-13 09:11:25 时间
本站中文解释
The number of outstanding connection requests MySQL can have.
This comes into play when the main MySQL thread gets very many
connection requests in a very short time. It then takes some
time (although very little) for the main thread to check the
connection and start a new thread. The
back_log value indicates how
many requests can be stacked during this short time before
MySQL momentarily stops answering new requests. You need to
increase this only if you expect a large number of connections
in a short period of time. In other words, this value is the size of the listen queue for
incoming TCP/IP connections. Your operating system has its own
limit on the size of this queue. The manual page for the Unix
listen() system call should have more
details. Check your OS documentation for the maximum value for
this variable. back_log
cannot be set higher than your operating system limit. The default value is based on the following formula, capped to
a limit of 900:
我想要获取技术服务或软件
服务范围:MySQL、ORACLE、SQLSERVER、MongoDB、PostgreSQL 、程序问题
服务方式:远程服务、电话支持、现场服务,沟通指定方式服务
技术标签:数据恢复、安装配置、数据迁移、集群容灾、异常处理、其它问题
本站部分文章参考或来源于网络,如有侵权请联系站长。
数据库远程运维 MySQL Variables back_log 数据库 参数变量解释及正确配置使用
MySQL的 back_log 参数用于指定MySQL服务器的TCP/IP连接队列的大小。这个参数用来确定MySQL服务器可以接受的最大连接数,因为在任何时候,MySQL服务器的进程都在处理客户端的请求,如果一次处理太多请求,就需要增加连接队列大小,如果太少,就会发生超时,许多客户端就不能够连接到MySQL服务器。
通过在MySQL服务器中设置back_log参数,可以确定MySQL服务器可以接受的最大连接数;通常将back_log参数设置为系统最大连接数的2倍,即32个;如果您的服务器连接频繁,您可以将其设置的更大,如64个。
设置back_log参数的方法如下:
第一步:登录mysql服务器,进入mysql终端。
第二步:加载mysql参数变量文件(my.cnf),执行命令:mysql source my.cnf
第三步:执行命令行:mysql SET GLOBAL back_log= N 。其中,N为设定的back_log参数值。
第四步:查看设置是否生效,执行命令:mysql show variables like “back_log”;
第五步:保存修改。执行命令:mysql service mysql restart 或 重启mysql服务。
The number of outstanding connection requests MySQL can have.
This comes into play when the main MySQL thread gets very many
connection requests in a very short time. It then takes some
time (although very little) for the main thread to check the
connection and start a new thread. The
back_log value indicates how
many requests can be stacked during this short time before
MySQL momentarily stops answering new requests. You need to
increase this only if you expect a large number of connections
in a short period of time. In other words, this value is the size of the listen queue for
incoming TCP/IP connections. Your operating system has its own
limit on the size of this queue. The manual page for the Unix
listen() system call should have more
details. Check your OS documentation for the maximum value for
this variable. back_log
cannot be set higher than your operating system limit. The default value is based on the following formula, capped to
a limit of 900:
50 + (max_connections / 5)
我想要获取技术服务或软件
服务范围:MySQL、ORACLE、SQLSERVER、MongoDB、PostgreSQL 、程序问题
服务方式:远程服务、电话支持、现场服务,沟通指定方式服务
技术标签:数据恢复、安装配置、数据迁移、集群容灾、异常处理、其它问题
本站部分文章参考或来源于网络,如有侵权请联系站长。
数据库远程运维 MySQL Variables back_log 数据库 参数变量解释及正确配置使用
相关文章
- 【MySQL高级】MySql中常用工具及Mysql 日志
- MySQL分布式数据库搭建指南(mysql分布式数据库搭建)
- 用户快速简便:MySQL批量添加用户(mysql批量添加)
- MySQL缓冲池:实现高性能数据库连接(mysql缓冲池)
- Mysql取出指定日期的记录(mysql取日期)
- 免费下载MySQL,获取一流的数据库服务(mysql免费下载)
- ES与MySQL的完美同步解决方案(es同步mysql)
- 深入浅出MySQL:锁行、锁表详解(mysql锁行锁表)
- MySQL自增长主键设置指南(mysql设置自增长主键)
- MySQL数据库中运行存储过程的简单指南(mysql运行存储过程)
- 如何避免 MySQL 数据库的脏读问题?(mysql脏读)
- 构建MySQL高性能架构:优化数据库引擎、索引、缓存等策略(mysql高性能架构)
- 学会寻址MySQL:访问数据库的简单方法(怎么访问mysql数据库)
- MySQL如何创建数据表?(mysql建立数据表)
- MySQL如何编辑数据库?(mysql编辑数据库)
- MySQL主从复制验证:实现可靠的数据同步(mysql主从验证)
- MySQL数据库连接池:快速实现配置的指南(mysql数据连接池配置)
- MySQL数据库配置文件调整实践(mysql数据库配置文件)
- MySQL使用手册从入门到精通(mysql中manual)
- C MySQL数据库实现自动加锁(c++ mysql加锁)
- Mysql数据库设计全面了解三大范式的原理和实现(mysql三大范式的内容)
- MySQL零安装,快速使用(mysql不安装直接使用)
- MySQL数据库禁止空值输入(mysql不允许空值)
- 周五MySQL开发更新了哪些内容看这里(mysql 上周五)
- MySQL数据库中的字段不能为NULL的处理方法(mysql 不能null)
- MySQL 数据库不支持非数字格式数据(mysql+不是数字格式)