title: Java: Insert scores into remote MySQL database without hardcoding login credentials
body: <p>I'm writing a small game in Java and I want to save user scores into a remote MySQL database. I'm using JDBC right now and I've got the connection working. I can insert and read as desired. The login credentials are hardcoded right now though:</p>
  
  <pre><code>public class DatabaseHandler {
      private final String URL = "jdbc:mysql://_ip_goes_here_:3306/";
      private final String DB_NAME = "db_name";
      private final String USERNAME = "username";
      private final String PASSWORD = "password";
  
      //Rest of class
  }
  </code></pre>
  
  <p>I can imagine that one could easily decompile the class file and extract this Information, thus gaining the ability to write into the database as they see fit.</p>
  
  <p>Is there a better option to archive connection or would you use some kind of middleman between the .jar and the database? How would one realize this?</p>