This is a 10 years old question, but anyway here's what worked for me. I'm using MySQL 8.0 with Hibernate 5 and SpringBoot 4.
I've tried the above accepted answer but didn't work for me, what worked for me is this:
db.url=jdbc:mysql://localhost:3306/testdb?useSSL=false&serverTimezone=Europe/Warsaw
If this helps you don't forget to upvote it :D