# Hibernate with MySQL throws "WrongArgumentException: Malformed database URL, failed to parse the connection string near: useJDBCCompliantTimezoneShift, useLegacyDatetimeCode, serverTimezone"

**URL:** <https://discourse.hibernate.org/t/hibernate-with-mysql-throws-wrongargumentexception-malformed-database-url-failed-to-parse-the-connection-string-near-usejdbccomplianttimezoneshift-uselegacydatetimecode-servertimezone/931>\
**Category:** Hibernate ORM\
**Created:** [June 16, 2018, 10:56am UTC](https://discourse.hibernate.org/t/hibernate-with-mysql-throws-wrongargumentexception-malformed-database-url-failed-to-parse-the-connection-string-near-usejdbccomplianttimezoneshift-uselegacydatetimecode-servertimezone/931 "2018-06-16T10:56:23Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![vlad](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/vlad/32/658_2.png) [@vlad](https://discourse.hibernate.org/u/vlad)\
**Post date:** [June 16, 2018, 4:16pm UTC](https://discourse.hibernate.org/t/hibernate-with-mysql-throws-wrongargumentexception-malformed-database-url-failed-to-parse-the-connection-string-near-usejdbccomplianttimezoneshift-uselegacydatetimecode-servertimezone/931/3 "2018-06-16T16:16:46Z")

</div>

> [@praveenkumar\_mummidi](#):
>
> Caused by: com.mysql.cj.core.exceptions.WrongArgumentException: Malformed database URL, failed to parse the connection string near ‘;useJDBCCompliantTimezoneShift=true&amp;useLegacyDatetimeCode=false&amp;serverTimezone=UTC’.

You either need to change the MySQL Connector/J Driver to 5.x or change the URL since [MySQL 8.0 has removed these properties](https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-configuration-properties.html):

- `useJDBCCompliantTimezoneShift`
- `useLegacyDatetimeCode`

---

_[View the full topic](https://discourse.hibernate.org/t/hibernate-with-mysql-throws-wrongargumentexception-malformed-database-url-failed-to-parse-the-connection-string-near-usejdbccomplianttimezoneshift-uselegacydatetimecode-servertimezone/931)._
