I get this error:

java.sql.SQLException: The server time zone value 'unknown' 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 specific time zone value if you want to utilize time zone support.

I've tried changing the convertToNull to CONVERT_TO_NULL or EXCEPTION since I don't know what to do.

 String myURL = "jdbc:mysql://localhost:3306/registrationdata? 
 zeroDateTimeBehavior=CONVERT_TO_NULL";

I expect to save data to mysql but since I don't know how to set the timezeone, I always get an error.

0 Answers