I'm running a sample from a book that uses a
servlet to connect to MySQL, the relevant code is:
Even if I try a simple SQL statement like SELECT * FROM User; I get the error message
SQL result:
Error executing the SQL statement:
No suitable driver found for jdbc:mysql://localhost:3306/murach
I am using a type 4 connection. According to the book all you need to do is download the Connector/J from MySQL (mysql-connector-java-5.0.8-bin.jar)
put it into the jdk/jre/lib/ext directory and the connector will be available to any app (in
java 1.6 and up) and will be loaded automatically. I even added the jar
file to the project, but that had the same result.
Anyone have any answers?
Thanks in advance
Mike