"The server timezone value is unrecognized" MySQL Error
Last modified by Eleni Cojocariu on 2026/09/10 20:35
Content
Explanation
XWiki fails to connect to MySQL, and the JDBC driver reports:
The server timezone value 'CDT' is unrecognized or represents more than one timezone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc timezone value if you want to utilize timezone support.Cause
The MySQL JDBC driver asks the server which time zone it runs in, because it converts date and time values between the two, and it needs an answer that identifies exactly one zone. The abbreviation the server returned, CDT in the message above , names more than one, so the driver cannot tell which offset to apply and refuses the connection instead of guessing. XWiki configures no time zone of its own: the requirement belongs to the driver, and either end of the connection can satisfy it.
Solution
- Name the time zone as a connection property in the MySQL block of the WEB-INF/hibernate.cfg.xml file, next to the other connection properties it already sets:
<property name="hibernate.connection.serverTimezone">Europe/Berlin</property> - Or append it to the connection URL in the same file, which suits an instance that keeps everything in one property:
jdbc:mysql://localhost:3306/xwiki?serverTimezone=UTC - Or give the MySQL server itself an unambiguous time zone, in its own configuration file, so that every client it serves gets a usable answer.
- Restart XWiki. Any one of the three is enough: the connection is established and the wiki starts normally.