i have homework, and i need use mysql and java. i need acces to my table on mysql workbench, the table employeee, i download the driver and do every thing right, but i get error of :
The server time zone value '???? ???? ???????' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the
serverTimezone
configuration property) to use a more specifc time zone value if you want to utilize time zone support.
if its relevant this is my code.
import java.sql.*;
public class Driver {
public static void main(String[] args) {
Connection myConn = null;
try {
myConn =(Connection) DriverManager.getConnection("jdbc:mysql://localhost:3306/employee",
"root", "root");
//create statement
Statement myStmt = myConn.createStatement();
if (myConn !=null) {
System.out.println("connection succsesful");
//excute sql query
ResultSet myRs = myStmt.executeQuery("select * from project");
//process the result set
while(myRs.next()) {
System.out.println(myRs.getString("DNUM") + "," + myRs.getString("PNUMBER"));
}
}
}
catch(Exception exc) {
System.out.println("connection failed");
exc.printStackTrace();
}
}
}