mysql - play 2.4 connect to remote database -


i'm new play , scala, using latest play 2.4.x. want connect mysql through remote ip following configuration

in application.conf

db.default.driver="com.mysql.jdbc.driver" db.default.url="jdbc:mysql://10.0.1.32:3306/scala_test_db" db.default.username="scalauser" db.default.password="test" 

in build.sbt

"mysql" % "mysql-connector-java" % "5.1.36" 

but jdbc trying connect local ip. following error got

java.sql.sqlexception: access denied user 'scalauser'@'10.0.0.224'  

can me how connect remote ip?

your configuration looks fine. error message told mysql user 'scalauser'@'10.0.0.224' has no access. means app connecting database 10.0.0.224.

i guess need add new database user.

grant usage on scala_test_db.* 'scalauser'@'10.0.0.224'; flush privileges; 

check mysql docs: http://dev.mysql.com/doc/refman/5.6/en/grant.html


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

c# - two queries in same method -