java.net.ConnectException: Connection refused: connect

Asked on April 23, 2013
I am connecting to Mysql in my spring application but got the below error.
Need help
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:257)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:294)
... 19 more

Replied on April 23, 2013
Hi Ria,
1. The database connection is not available i.e your mysql server is not started.
2. you have configured incorrect database URL.
1. The database connection is not available i.e your mysql server is not started.
2. you have configured incorrect database URL.