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

centos_7 mariadb 优化参数

一二三4年前 (2022-05-13)Centos1070
最大链接数
输入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 mariadb 10.5集群式部署

Centos7 mariadb 10.5集群式部署

1、环境准备准备三台虚拟机,分别安装CentOS7-7.7。服务器A:10.88.1.14 node1服务器B:10.88.1.15 node2服务器C:10.88.1.16 node3三台虚机上关闭...

MySQL数据库的数据备份和恢复(导入和导出)命令操作语法

1、mysql导出数据库命令mysqldump -h[主机所在IP] -u[用户名] -p [要导出的数据库]>[导出的路径//[文件名].sql]1)mysqldump字符集设置mysqldu...

Centos7 MariaDB Galera cluster初始化和启动报错两例

问题一:160613  0:43:36 [Note] WSREP: Read nil XID from storage engines, skipping position init1606...

mysql(mariadb)数据库集群故障处理及数据导入导出

1、3台数据库的集群(版本为mariadb10.3.8),有一台服务器down,另外两台就无法工作了--- 脑裂了!: WSREP has not yet&n...

Centos 关闭selinux

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

Centos 同步网络时间

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