title: Android - safest way to connect to MySQL database
body: <p>I'm developping an Android app which uses the same MySQL server as a website is using.</p>
  
  <p>I want to connect to the database in my app, and I've done that before by placing some PHP files on the server and use a HTTP post and retrieve the response in json format. I don't know why - I'm not a specialist - but this just doesn't look like a very safe way to me.</p>
  
  <p>Using a SOAP or REST webservice looks safer to me, but I don't know how to deploy those on a server (the server is not mine, I don't want to fool around too much with it).</p>
  
  <p>So what is the safest way for me then?</p>
  
  <p>And if I'm using PHP scripts, should I store the database credentials in the PHP scripts or in my application and pass them to the PHP script? What's the safest of these?</p>
  
  <p>Thanks</p>