And this is the error i am getting.

Even though i added mysql connector to the database, which was the common solution for this problem, but i am still having it. Any advices?
Thanks in advance!
Since Java 1.6, JDBC 4.0 API provides a new feature to discover java.sql.Driver automatically and therefore Class.forName is no longer required.
Assuming login is the name of your database, use the following code in getConnection:
return DriverManager.getConnection("jdbc:mysql://localhost/login?user=dbuser&password=dbpassword");
dbuser with password as dbpassword with the required privileges? If not, first create them and test using a SQL client whether you can login to your database with these credentials. Check stackoverflow.com/questions/1720244/… for help.
Class.forName("com.mysql.jdbc.Driver");And rather than uploading pictures post your code.