Getting JDBC MySQL persistence back to work with 2.5 Snapshots on Windows

Tags: #<Tag:0x00007f6173b7a508>

I just upgraded from 2.4 Snapshot 1407 to 2.5 Snapshot 1511 and found that the jdbc mysql persistence configuration was the most breaking change of all. For whatever reason you now need a timezone configuration (which was not needed for years…).
In a Windows environment it was pretty hard to get it back running as you need to populate the time_zone tables in mysql with a downloadable script. As maybe others users may encounter the same trouble I just would like to share the solution with you. The script can be found here:

https://dev.mysql.com/downloads/timezones.html

After downloading you have to execute it, but NOT in the Openhab DB environment but on the global mysql level. After the tables have been populated with the TimeZoneData I also modified my database URL and added the Timezone to

url=jdbc:mysql://127.0.0.1:3306/OpenHAB?useSSL=false&serverTimezone=Europe/Berlin

After that, the jdbc mysql persistence also worked with Snapshot 1511.

5 Likes