我正在开发一个小游戏!2.0 web应用程序,我必须使用一个无法访问的远程mysql服务器的连接(我只有一个phpMyAdmin页面可以访问它(,但当我尝试启动该应用程序时,我遇到了这个错误。
[error] c.j.b.h.AbstractConnectionHook - Failed to obtain initial connection Sleeping
for 0ms and trying again. Attempts left: 0. Exception: null.Message:null,
message from server:
"Host 'xxx.xxx.xxx.xxx' is not allowed to connect to this MySQL server"
Oops, cannot start the server.
Configuration error: Configuration error[Cannot connect to database [default]]
这就是我配置连接的方式:
db.default.driver=com.mysql.jdbc.Driver
db.default.url="jdbc:mysql://<my_server_ip>/<db_name>"
db.default.user="<user>"
db.default.password= "<password>"
如果我犯了任何错误,或者问题出在有mysql服务器的服务器上,而他们没有授予我访问权限,我就得不到什么。
谢谢。
这与Play无关-您需要允许从您的实际IP或所有远程客户端访问此远程数据库,例如:https://stackoverflow.com/a/12844804/1066240