I've been working on installing Connector/J on my computer, but I can't make it work. There are some problems I encounter along the way. Here is what I did:
(based on what I read in the internet)
First I downloaded mysql-connector-java-5.0.8. After extracting it, I guess I am supposed to put mysql-connector-java-5.0.8-bin.jar
where my classpath is. Here I have a problem, after installing java jdk v8, I don't get any variable called classpath in my environment variable. So how am I supposed to put it somewhere without knowing where?
I read in the net that I should put it in C:\Program Files\Java\jdk1.8.0_45\jre\lib\ext
And then I have to set the classpath variable accordingly. I created a new variable and set it with variable name : classpath
and variable value : C:\Program Files\Java\jdk1.8.0_45\jre\lib\ext
After running my program in Netbeans (the program is supposed to connect to a database) I get this error:
No suitable driver found for jdbc:mysql://127.0.0.1:3306
Which is for the line that I am trying to get a connection :
connection = DriverManager.getConnection(DATABASE_URL, "reza", "reza" );
I really have no idea what is happening here. I am lost, I searched over and over again but nothing seemed to work.