Home > Database > Mysql Tutorial > body text

MySQL内存储器参数及调整

WBOY
Release: 2016-06-07 16:25:53
Original
1253 people have browsed it

MySQL内存参数及调整 1. 慢查询 日志: slow_launch_time=2 ?查询大于某个时间的值(单位:s) slow_query_log=on/off ?开启关闭慢查询日志 slow_query_log_file=/opt/data/host-slow.log ?慢查询日志位置 ? ? 2.连接数: max_connections MySQL最大连接数 back_

MySQL内存参数及调整

1.慢查询日志:

slow_launch_time=2 ?查询大于某个时间的值(单位:s)

slow_query_log=on/off ?开启关闭慢查询日志

slow_query_log_file=/opt/data/host-slow.log ?慢查询日志位置

?

?

2.连接数:

max_connections MySQL最大连接数

back_log ? 当连接数满了后,设置一个值,允许多少个连接进入等待堆栈

max_connect_errors ?账号连接到服务器允许的错误次数

connect_timeout ?一个连接报文的最大时间(单位:s)

skip-name-resolve ?加入my.cnf即可,MySQL在收到连接请求的时候,会根据请求包?

中获得的ip来反向追查请求者的主机名。然后再根据返回

的主机名又一次去获取ip。如果两次获得的ip相同,那么连接就成功建立了。

加了次参数,即可省去这个步骤

NOTES:

查询当前连接数:show global status like 'connections';

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!