I stedet for at bruge :
String uname="[email protected]";
Brug:
String url="jdbc:mysql://localhost:3306/student";
String userName="root"
String password="Hsun123"
...
try{
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection con=DriverManager.getConnection(url,username,password);
...
Dette burde virke (forudsat at du angiver den gyldige adgangskode)