Question

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.

Était-ce utile?

La solution

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top