mysql报错 Data source rejected establishment of connection, message from server “too many connections“

mysql报错 Data source rejected establishment of connection, message from server "too many connections"

1、问题描述

启动服务时没启动成功,查看错误日志,报错如下

Data source rejected establishment of connection, message from server "too many connections"

2、错误原因

Mysql数据库最大连接数设置的太小,导致应用不能创建Mysql数据库连接
查看Mysql数据库最大连接数

SHOW VARIABLES LIKE 'max_connections';

最大连接数是151

在这里插入图片描述
查看应用报错时,Mysql实际连接数 是264,超过mysql设置的最大连接数151。
在这里插入图片描述

3、解决方法

修改mysql配置文件/etc/my.cnf

vi /etc/my.cnf

在最后加入一行

max_connections=10000

然后重启mysql服务

systemctl restart mysqld.service

查看Mysql数据库最大连接数

SHOW VARIABLES LIKE 'max_connections';

最大连接数是9190

在这里插入图片描述

  • 9
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
version: 0.96 (28.12.2011) *) Fix: SMTP relay failed if any of the MX records was not valid DNS name(pointed to non existent host name). (08.03.2011) *) Fix: If SMTP relay connect failed and DSN message requested, no DSN message was sent. (15.03.2011) *) Fix: IMAP SEARCH CHARSET rejected UTF-8. (29.03.2011) *) Fix: If SMTP relay traget host had duplicate MX records(more than 1 record with same name), (12.04.2011) relay rejected with error "An element with the same key already exists in the Dictionary". *) Fix: IMAP SEARCH didn't accept literal strings(unicode search). (20.04.2011) *) Fix: Relay DATA command 4xx responses were not handled as error. (01.08.2011) *) Fix: Relay DATA command SMTP server response tiemout(no response from server), may cause server crash. (01.08.2011) *) New: Updated to "http://system.data.sqlite.org" SQL lite provider with SQL Lite 3.7.7.1. (04.08.2011) *) Fix: SMTP relay didn't handle IPv6 MX records right. (05.08.2011) *) New: IMAP added UTF8=ACCEPT support. (29.08.2011) *) Fix: Multiple mail transactions per 1 connection failed. (12.09.2011) *) Fix: If remote host shut down socket(Socket.ShutDown), the empty command buffer considered as bad empty command (not disposing session before socket close reach). (04.10.2011) *) New: Added IMAP AUTHENTICATE initial response(SASL-IR) support. (05.10.2011) *) Fix: IMAP FETCH command retrurned wrong result if command line ended RFC822 or BODY. (25.10.2011) *) Fix: SSL connections failed(TLS was not affected). (04.11.2011) *) New: DNS internationalized(unicode) domain names support. (09.12.2011)

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值