title: No suitable driver found for jdbc.mysql
body: <p>I'm a student doing a course in Java and I've been stumped by an error I cannot resolve.</p>
  
  <p>The error as mentioned above is </p>
  
  <pre><code>No suitable driver found for jdbc.mysql
  </code></pre>
  
  <p>I've imported the Library and specified it in code, I've also tried numerous solutions posted by users on stackoverflow and yet, nothing.  If anyone has any further suggestions help would be greatly appreciated</p>
  
  <p>My code</p>
  
  <p>(I had to change my Xampp server conf file to listen to port 8080 because 80 was occupied by PID4 "System")</p>
  
  <pre><code>public class DBConnect {
  
    String DB_URL = "jdbc.mysql://localhost:3306/phpmyadmin/BCStationary?";
  
    public DBConnect() throws ClassNotFoundException {
      Connection conn = null;
  
      try {
        DriverManager.registerDriver(new com.mysql.jdbc.Driver());
        Class.forName("com.mysql.jdbc.Driver");
        conn = DriverManager.getConnection(DB_URL, "root", "");
        System.out.println("Connection Successful");
      } catch (SQLException ex) {
        System.out.println("Conn error ");
        Logger.getLogger(DBConnect.class.getName()).log(Level.SEVERE, null, ex);
      }
    }
  }
  </code></pre>