MYSQL DriverManager error

Discussion in 'Programming' started by DaanSander, May 1, 2015.

  1. Hello i am trying to connect to my database but when i do that i get a SQLException but when i ty it on my spigot plugins it works just fine

    Code (Text):
    java.sql.SQLException: No suitable driver found for jdbc:mysql://
        at java.sql.DriverManager.getConnection(Unknown Source)
        at java.sql.DriverManager.getConnection(Unknown Source)
        at me.daansander.login.database.MySql.getConnection(
        at me.daansander.login.database.Sql.connect(
        at me.daansander.login.Login.main(
    place of error:
    Code (Text):
    connection = DriverManager.getConnection("jdbc:mysql://" + host + ":" + port + "/" + db, user, pass);
  2. the driver isn't in the classpath, google "java mysql driver", download the .jar from oracle and add it to your classpath
    • Agree Agree x 1
    • Winner Winner x 1