문제

I'm developing a little play! 2.0 web app, and I have to use a connection to a remote mysql server that I can't access (I only have a phpMyAdmin page to access it), but when I try to start the app I got this error.

[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]]

This is how I configured my connection:

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>"

What I can't get if I am making any mistake, or if the problem is on the server where there is mysql server, and they diddn't grant me the access.

Thanks.

도움이 되었습니까?

해결책

It's not about Play - you need to allow access to this remote database from your actual IP or for all remote clients, i.e. like in this answer: https://stackoverflow.com/a/12844804/1066240

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top