title: Unable to Access RDS with JDBC in AWS
body: <p>I am finding hard time connecting to RDS using JDBC connection, I am able to connect through MYSQL workbench, I deployed my WAR file in A WSwhich is running tomcat, this WAR file has my JDBCcode connecting to RDS, but I am not even able to establish connection.
  My code is as below:-</p>
  
  <pre><code>public static Connection getconnection(){
  
       String connectionUrl = "jdbc:mysql://testinstance.cj3ixhryi3fb.us-west-2.rds.amazonaws.com:3306/testDB";
          String dbUser = "testuser";
          String dbPwd = "usertest";
          Connection conn = null;
  
          try {
              conn = (Connection) DriverManager.getConnection(connectionUrl, dbUser, dbPwd);
              System.out.println("conn Available");
          } catch (SQLException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
              System.out.println("fetch otion error"+e.getLocalizedMessage());
          }
  
          return conn;
  }   
  </code></pre>
  
  <p>I included all the necessary jar files, and rules security groups but no luck.</p>
  
  <p><strong>I am using the EC2 security group for RDS. Does RDS will use ec2 security groups?</strong>
  or I need to have different security group for RDS?</p>
  
  <p>the testinstance is a working link if any one wanna test.</p>