1. Time zone
Insert datetime into the database and find that the data stored in the database is 13 hours later than the actual time, and the server time is east 8 no problem. Solution: Add serverTimezone=GMT%2b8 to the connection database URL
1, Java.sqL.sqlexception: The connection property ‘zeroDateTimeBehavior’ acceptable values are: ‘CONVERT_TO_NULL’, ‘EXCEPTION’ or ‘ROUND’. The value ‘convertToNull’ is not acceptable.
In mysql8, the value of zeroDateTimeBehavior was changed, and the old code was convertToNull, so an error was reported. Solution: Change to CONVERT_TO_NULL, or use the driver 8.0.13 or later. One point was mentioned in the 8.0.13 Release note
==Connector/J now translates the legacy value of convertToNull for the connection property zeroDateTimeBehavior to CONVERT_TO_NULL. This allows applications or frameworks that use the legacy value (for example, To work with Connector/J 8.0. (Bug #28246270, Bug #91421)==
When using the old script, it is automatically translated to the new script during parsing, so as to ensure compatibility, no configuration changes are needed.