title: How to connect Java to Mysql?
body: <p>I got these errors for my Java program. I have already put the <code>mysql-connector-java-5.1.14-bin.jar</code> inside my classpath. How to solve this?    </p>
  
  <pre><code>HSystemRDB.java:144: package com.mysql.jdbc does not exist
      Driver driver = new com.mysql.jdbc.Driver();
                                        ^
  HTestClassRDB.java:99: package com.mysql.jdbc does not exist
          DriverManager.registerDriver(new com.mysql.jdbc.Driver());
  </code></pre>
  
  <p>The code:</p>
  
  <pre><code>    String url = "jdbc:mysql://wire:3306/h?user="+pSystemRDB.USERNAME+"&amp;password="+pSystemRDB.PASSWORD;
      Connection con;
      Statement stmt;
      String query1 = "Delete from dbase";
      String query2 = "Delete from id";
  
  
      try {
          DriverManager.registerDriver(new com.mysql.jdbc.Driver());
      } catch (Exception e) {
          System.out.println("Class Not Found Exception:");
          System.out.println(e.getMessage());
      }
  </code></pre>