java.lang.ClassNotFoundException: com.mysql.jdbc.Driver java error
After executing below code i get java.lang.ClassNotFoundException: com.mysql.jdbc.Driver error.How do i go about solving this mysql server connection error with java.
This error is brought about by the lack of MySQL-connector libraries in your class path.First, download MySQL-connector and then go ahead and add it to your project.
If you are using NetBeans, click your project and go to Libraries.
Click Add Jar file and below window will open.
Set it as an absolute path.Then click open.
The mysql-connector file should appear as shown below and the error should disappear away.