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

centos_7 mariadb 的最大连接数max_connections修改

一二三5年前 (2020-12-05)Centos760
输入show variables like 'max_connections';

一、修改mariadb.service
vim /usr/lib/systemd/system/mariadb.service
在[Service]下面加入以下内容

LimitNOFILE=10000
LimitNPROC=10000

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

max_connections=4096

输入show variables like 'max_connections';

就看到改变了


扫描二维码至手机访问

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

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

分享给朋友:

相关文章

Centos7 mariadb 10.5集群式部署常见故障处理

Centos7 mariadb 10.5集群式部署常见故障处理

1、It may not be safe to bootstrap the cluster from this node. It was not the last one一、故障现象查看mysql错误...

Centos7 yum 安装 keepalived

1、安装epel源,方便后面安装keepalivedyum install epel-release -y2、安装keepalivedyum install keepalived -y3、常用命令开机...

Linux(CENTOS7) 安装 Docker + 部署OnlyOffice

1、安装dockeryum install docker -y2、启动docker服务systemctl start docker3、查看docker...

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 添加磁盘到/(根目录下),扩展VG卷和lv

1.创建pvfdisk /dev/xvdc输入n增加分区输入p类型设置为:主分区输入1分区编号设置为1回车 为默认大小回车 为默认 大小输入w退出2.把pv加入vg中,相当于扩充vg的大小扩展vg,使...

Centos7 防火墙(firewall)常用操作

防火墙操作查看防火墙状态启动: systemctl start firewalld查看状态: systemctl status firewalld 停止:  systemctl s...