当前位置:首页 > 服务器系统 > Centos > 正文内容

centos_7 mariadb 优化参数

一二三4年前 (2022-05-13)Centos1053
最大链接数
输入show variables like 'max_connections';一、修改mariadb.service
vim /usr/lib/systemd/system/mariadb.service
在[Service]下面加入以下内容

LimitNOFILE=30000
LimitNPROC=30000

二、修改/etc/my.cnf
vim /etc/my.cnf
在[mysqld]下,加入以下内容

max_connections=30000

输入show variables like 'max_connections';
优化超时时间
max_allowed_packet = 64M
wait_timeout = 2880000
interactive_timeout = 2880000
connect_timeout = 120


扫描二维码至手机访问

扫描二维码推送至手机访问。

版权声明:本文由一二三博客发布,如需转载请注明出处。

分享给朋友:
返回列表

上一篇:CENTOS7开机自启动脚本

没有最新的文章了...

相关文章

Centos7 LVS+Keepalived+Nginx基于NAT模式构建高可用方案

Centos7 LVS+Keepalived+Nginx基于NAT模式构建高可用方案

1、准备机器名称网卡0网卡1VIPlvsmaster58.218.92.185(网关:58.218.92.1)10.77.1.20(不配置网关)58.218.92.187lvsbackup58.218...

CENTOS7开机自启动脚本

1、因为在centos7中/etc/rc.d/rc.local的权限被降低了,所以需要赋予其可执行权 chmod +x /etc/rc.d/rc.local 2、赋予脚本可执行...

Centos 同步网络时间

Centos 同步网络时间yum install ntpdate -yntpdate ntp1.aliyun.com...

Nginx SSL配置协议

upstream web_backends_80 {   ip_hash; #每个请求按访问ip的hash结果分配可以解决session的问题。...

Centos 关闭selinux

Centos 关闭selinux:setenforce 0修改/etc/selinux/config,设置SELINUX=disabled,确保重启后也生效。...

centos_7 mariadb 的最大连接数max_connections修改

输入show variables like 'max_connections'; 一、修改mariadb.service vim /us...