com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:在mysql中 [英] com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: in mysql

查看:127
本文介绍了com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:在mysql中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了jdbc程序,数据库是MySQL 5.1 我所有的朋友也使用相同的数据库进行连接.连接的总数从我们所有人变成了150. 所以当我想连接更多时,会出现以下错误

Hi I have created jdbc program and database is MySQL 5.1 Also all my friends using same database for connection. Total number of connection became 150 from all of us. So when i want to connect more then i got the following error

com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:无法创建与数据库服务器的连接.尝试重新连接3次.放弃.

com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.

如何解决此错误.

谢谢 苏尼尔·库马尔·萨胡(Sunil Kumar Sahoo)

Thanks Sunil Kumar Sahoo

推荐答案

我通过增加连接数解决了这个问题

I solved the problem by increasing number of connection

设置@@ global.max_connections = 1250;

set @@global.max_connections = 1250;

看看下面的链接 http://www.netadmintools.com/art573.html

这篇关于com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:在mysql中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆