问题描述
我已经创建了jdbc程序,数据库是MySQL 5.1我所有的朋友也使用相同的数据库进行连接.连接的总数从我们所有人变成了150.所以当我想连接更多时,会出现以下错误
Hi I have created jdbc program and database is MySQL 5.1Also 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)
ThanksSunil 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中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!