Re: How to specify property IGNORE_SPACE in URL
Posted by: Filipe Silva
Date: October 08, 2018 05:15AM

Hi Prashant,

Try setting the URL as jdbc:mysql://localhost:3306/mydb?sessionVariables=SQL_MODE=IGNORE_SPACE.

Note that you have two errors in the URL:
1. You must use a `?` between the database name and properties sections, instead of `&`.
2. You must use the connection option `sessionVariables` to pass through any session settings - https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-configuration-properties.html

Mind that by setting this option explicitly you override other SQL_MODE options that are set by default and you may still need them. In order to avoid this you'll have to set all SQL_MODE options you need in the URL.

IHTH

Options: ReplyQuote


Subject
Written By
Posted
Re: How to specify property IGNORE_SPACE in URL
October 08, 2018 05:15AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.