title: How to connect java to a website/webhost database
body: <p>Ok, I have been trying to connect to a database from a client program to a web server using java, and I will be very specific in this question.</p>
  
  <p>I am using "ServersFree.com" as the web host that is hosting my database.
  I am using the latest java run time environment and the latest java SDK (JavaSE-1.7 as of the time of this writing).
  I am using windows 7 Home Premium as my platform for writing this program.</p>
  
  <p>Here is what I am trying to do to attempt the connection to this web server and the database within:</p>
  
  <pre><code>        try
          {
              String host = "jdbc:mysql://server17.serversfree.com/database";
              String username = "admin";
              String password = "example";
  
              Connection con = DriverManager.getConnection(host, username, password);
          }
          catch(SQLException e)
          {
              System.out.println("There is an error with the SQL database: " + e.getMessage());
          }
  </code></pre>
  
  <p>I have done some research for this and it turns out I might need a driver for the connection (seeing as I am getting an error from the output like this: "No suitable driver found for jdbc:mysql://server17.serversfree.com/database")</p>
  
  <p>Output:</p>
  
  <pre><code>There is an error with the SQL database: No suitable driver found for jdbc:mysql://server17.serversfree.com/database
  </code></pre>
  
  <p>My questions are 1.) what driver is this program talking about that I don't have? and 2.) Where should I go or look to understand this problem?</p>
  
  <p>Note: I noticed some people recommended not to use Microsoft's driver for this problem, and I tried looking for a jar file called "sqljdbc4.jar", but I had no luck finding it.</p>
  
  <p>Any help would be appreciated. (anything that could point me to the right direction.)</p>