Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot create PoolableConnectionFactory

Tags:

What is the problem? Can't connect to database?

   org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (             Communications link failure      The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.) 
like image 958
ujava Avatar asked Mar 05 '11 12:03

ujava


Video Answer


2 Answers

This is the actual cause of the problem:

Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

You have a database communication link problem. Make sure that your application have network access to your database (and the firewall isn't blocking ports to your database).

like image 179
Buhake Sindi Avatar answered Nov 11 '22 16:11

Buhake Sindi


I had the same problem with localhost in the source URL. I resolved with 127.0.0.1 instead of localhost.

like image 21
Shinigami Avatar answered Nov 11 '22 16:11

Shinigami