title: AWS Elastic Beanstalk trouble: RDS connection error: Access denied for user 'sa'
body: <p>this is my first time using anything AWS-related.</p>
  
  <p>I have a war containing a Grails 2.1.1 app. The DataSource.groovy was compiled to use the</p>
  
  <pre><code>url = System.getProperty("JDBC_CONNECTION_STRING")
  </code></pre>
  
  <p>method of retrieving the db connection string.</p>
  
  <p>In my EC2 environment configuration, under the Container tab, I have the following value for JDBC_CONNECTION_STRING, which has the correct details for my RDS instance:</p>
  
  <blockquote>
    <p>jdbc:mysql://aatxmz44i5auf0.cqp6ibnaxohn.eu-west-1.rds.amazonaws.com/ebdb?user=myusername&amp;password=mypassword</p>
  </blockquote>
  
  <p>Note that "mysername" does not equal 'sa'.</p>
  
  <p>After application startup, the snapshot logs come back with a stack trace error with the following root cause:</p>
  
  <pre><code>Caused by: java.sql.SQLException: Access denied for user 'sa'@'ip-10-226-5-172.eu-west-1.compute.internal' (using password: YES)
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4096)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4028)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:951)
      at ...
  </code></pre>
  
  <p>Any idea as to why my specifies JDBC connection URL isn't working. I used these instructions to configure &amp; deploy my app.</p>
  
  <p>All help greatly appreciated.</p>
  
  <p>Donovan</p>