title: Reading and writing from a mySQL Database
body: <p>I want to create a java program which can connect to an online mySQL database. I have done some research and figured out that I should use an online mySQL database. In java, I understand there is a JDBC library for connecting to databases. How can I connect to the database online with reading and writing to it? I am looking into using the Google Cloud SQL. It says to connect to it like any other mySQL Database.</p>
  
  <p>Google Cloud SQL:<a href="https://cloud.google.com/sql/docs/external" rel="nofollow">Website</a></p>
  
  <p>Basically, my main question is: How can I connect to an online mySQL database with reading and writing to it from a java application?</p>
  
  <p><strong>Edit</strong>: Also is there any example for reading and writing to the database, not just how to connect?</p>