我已经阅读了所有关于类似问题的类似帖子但是无法连接到远程mysql实例(实际上它是通过mysql协议进行通信的Sphinxserver)。基本上应用程序完全挂起而不做任何事情。从解决类似问题的人那里获得任何帮助。
这是我的相关配置等
application.conf (我尝试了很多组合而没有成功)
db.default.driver="com.mysql.jdbc.Driver"
db.default.url="jdbc:mysql://55.55.55.55:3306/search?characterEncoding=UTF-8"
db.default.user=admin
db.default.password=test
db.default.host="55.55.55.55" (# fails with or without)
db.default.port="3306" (# fails with or without)
db.default.acquireRetryAttempts=2 (# fails with or without)
db.default.acquireRetryDelay=5 seconds (# fails with or without)
db.default.connectionTimeout=2 seconds (# fails with or without)
Build.scala
"mysql" % "mysql-connector-java" % "5.1.18",
"com.typesafe.play" %% "anorm" % "2.2.0", // Anorm
"com.typesafe.play" %% "play-jdbc" % "2.2.0", // JDBC
javaJdbc, javaEbean
(I've tried with or without the javaJdbc and javaEbean)
控制台
(有一些警告,但不清楚它们与系统只挂了一个小时的事实有关)
[warn] one warning found
[warn] Potentially incompatible versions of dependencies of
[warn] org.scala-lang: 2.10.2, 2.10.0
[debug] 00:31:11 play: Plugin [play.api.db.evolutions.EvolutionsPlugin] is disabled
[debug] 00:31:11 play: Plugin [play.api.db.evolutions.EvolutionsPlugin] is disabled
[warn] 00:31:12 com.jolbox.bonecp.BoneCPConfig: releaseHelperThreads has been deprecated -- it tends to slow down your application more.
非常感谢您的帮助。 我已经验证我可以从控制台连接到mysql实例而没有任何问题,因此它似乎不会出现端口/防火墙问题。我今天试图解决这个问题并没有成功一定要拉我的头发!