• Post Reply Bookmark Topic Watch Topic
  • New Topic

access denied connecting Amazon RDS-Mysql from local Spring-JPA application

 
manvendra P singh
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have set up a mysql db at amazon RDS.
I'm able to connect to and query tables from my mac at home by mysqlworkbench, but when I try to connect it from a jersey-jpa-hibernate application inside eclipse I am getting below exception.



At the same time I'm successfully able to query database from mysqlWorkbench on same machine.
my MYSQL-RDS endpoint is
whereas the local tomcat trying to connect pool-xxx-.nwrknj.fios.verizon.ne
 
Karthik Shiraly
Bartender
Posts: 1210
25
Android C++ Java Linux PHP Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Manvendra, welcome to CodeRanch!

I've moved this to the ORM forum since it's related to JPA.

Coming to your question, did you use the same username 'manvendra' in Mysql workbench too?
 
manvendra P singh
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for reply Karthik.

I tried old way of JDBC api from my JPA DAO class, to check the connection problem, and realized that I'm able to query the DB from my server by java.

So I corrected all my config files. there was a discrepancy in db.properies and persistence.xml.
Its all working fine now.
Below are my working configurations.


Spring Config



Persistance XML


db.properties
 
Without subsidies, chem-ag food costs four times more than organic. Or this tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!