Amazon RDS instance in EBS: Access Denied when trying from Java
application in Tomcat
I created an EBS instance including the RDS instance based on MySQL.
I have access to the EC2 instance using SSH via PuTTY and using the MySQL
Workbench I've got access to the RDS instance as well and I can create
tables and insert data in them.
I developed a Java application using Netbeans 7.3.1 and when I run the
application locally while connecting to the MySQL instance on RDS the
application shows the same problem although I can connect to MySQL from
within Netbeans without a problem, ie I can connect to the database. But
as soon as I deploy my simple application onto EBS and run the same
application I get the error "Access denied for user ''@'' (using password:
YES)"
I added the IP to the Security Group of my RDS instance as well as the EBS
instance. Just to be sure.
Still I got the Access Denied error. The JDBC_CONNECTION_STRING
environment variable I've set up is
"jdbc:mysql://.cdydcnmtkkhw.us-west-1.rds.amazonaws.com:3306/ebdb?user=&password="
When I use any of the tools to connect to this database with that
information all works, when I try to connect from my Java application
running in Tomcat, I get the Access Denied message.
The Java call I'm using is:
private java.sql.Connection connect =
DriverManager.getConnection(jdbcConnect);
Any help would be appreciated as I'm totally stuck here.
Iwan*strong text*
No comments:
Post a Comment