开发者

Mysql Connection Error from 1.1.1 to 1.2.1

开发者 https://www.devze.com 2023-03-15 19:23 出处:网络
I upgraded from 1.1.1 to 1.2.1 and I seem to be getting the following exception when it attempts to connect to MySQL:

I upgraded from 1.1.1 to 1.2.1 and I seem to be getting the following exception when it attempts to connect to MySQL:

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)
    at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:343)
...
Caused by: java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net开发者_Python百科.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)

I've confirmed that MySQL is indeed running and seems to be working fine. The following is the line from my application.conf file (with user/pass/db replaced):

db=mysql:username:password@databasename

I also tried using the full JDBC configuration. Did I miss something? This worked just fine in 1.1.1. I'm running MySQL 5.1.41.

Thanks.


As an update - it was just a configuration issue. I just uncommented out the "db=mysql:..." line in the application.conf file. What I should have done is uncomment it and change it to:

dev.db=mysql:username:password@databasename


Did you clean tmp folder? play clean command should solve the problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消