ITeye博客

Mysql ERROR 1040 (00000): Too many connections

qepwqnp · 2013-09-23 16:38 · 原创 · 数据库 · Markdown

程序添加数据库数据:
错误信息: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Data source rejected establishment of connection, message from server: "Too many connections"

Navicat连接数据库报错
错误信息: 1040 Too many connections

重启Mysql :: mysql restart
错误信息:mysql ERROR 1040 (00000): Too many connections

当出现如下情况的时候,避免用户收到影响,先重启下Mysql[root@localhost ~]# service mysqld restart

[root@localhost ~]# mysql
mysql> select @@global.max_connections;
+--------------------------------------+
| @@global.max_connections |
+--------------------------------------+
| 100 | 
+--------------------------------------+

 

 

 

// 也就是说现在的最大连接数是 100,我们把他修改为500,。
mysql> set global max_connections=500; 
Query OK, 0 rows affected (0.00 sec)

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。