title: Java Web Application can't connect database on remote Tomcat 8 Server
body: <p>I have a Spring web application and I deployed this application in a remote Tomcat 8 server (AWS). I also deployed a database as an SQL file in the <strong>same</strong> server. When I tried to open my application in a web browser, the webpages were opened successfully but the web services doesn't work. I think it was because the web services uses the database.  </p>
  
  <p>This is my <code>database.properties</code>:</p>
  
  <pre><code> jdbc.url=jdbc:mysql://localhost:3306/srfms
   jdbc.username=*****
   jdbc.password=*****
  </code></pre>
  
  <p>I also tried another configuration:</p>
  
  <pre><code> jdbc.url=jdbc:mysql://94.73.145.205:3306/srfms
   jdbc.username=*****
   jdbc.password=*****
  </code></pre>
  
  <p>I can connect this database wtth MySQL Workbench successfully.</p>