Hello:
I can not make connection to MySQL from Java.
I set System Variable CLASSPATH to:
C:\MySQL\mysql-connector-java-5.0.5\mysql-connector-java-5.0.5-bin.jar
...
Then registered Driver:
...
try {
Class.forName(" com.mysql.jdbc. Driver").newIns tance();
}
...
Made Connection:
Connection conn =
DriverManager.g etConnection("j dbc:mysql://localhost:3306/test","User","P sw");
...
And got Error Message:
SQLException: No suitable driver found for jdbc:mysql://localhost:3306/test
How to make connection from Java to MySQL?
Thanks
I can not make connection to MySQL from Java.
I set System Variable CLASSPATH to:
C:\MySQL\mysql-connector-java-5.0.5\mysql-connector-java-5.0.5-bin.jar
...
Then registered Driver:
...
try {
Class.forName(" com.mysql.jdbc. Driver").newIns tance();
}
...
Made Connection:
Connection conn =
DriverManager.g etConnection("j dbc:mysql://localhost:3306/test","User","P sw");
...
And got Error Message:
SQLException: No suitable driver found for jdbc:mysql://localhost:3306/test
How to make connection from Java to MySQL?
Thanks
Comment