This error comes up constantly and it's because MySQL's default value for an IS NULL date is '0000-00-00', Java doesn't like this as it isn't a correct date. To fix this you need to add "&zeroDateTimeBehavior=convertToNull" to the connection string. However I've done this and SQL explorer ignores the ampersand and joins it altogether with the database name which then gives an unknown database error.
Any ideas of how to get around this?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This error comes up constantly and it's because MySQL's default value for an IS NULL date is '0000-00-00', Java doesn't like this as it isn't a correct date. To fix this you need to add "&zeroDateTimeBehavior=convertToNull" to the connection string. However I've done this and SQL explorer ignores the ampersand and joins it altogether with the database name which then gives an unknown database error.
Any ideas of how to get around this?
A connection URL is an URL so you have to start the query string part with an ?. The format is:
jdbc:mysql://<server>/<database>?zeroDateTimeBehavior=convertToNull
If youe want to add additional parameters use an & as separator:
jdbc:mysql://<server>/<database>?zeroDateTimeBehavior=convertToNull¶m2=value2
HTH