Bug #84050 | SSL warning spams logs | ||
---|---|---|---|
Submitted: | 4 Dec 2016 21:49 | Modified: | 6 Dec 2016 10:18 |
Reporter: | Matty Southall | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | Connector / J | Severity: | S3 (Non-critical) |
Version: | 5.1.40 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[4 Dec 2016 21:49]
Matty Southall
[5 Dec 2016 9:49]
Alexander Soklakov
Hi Matty, The warning happens only when you establish a new connection. And it's there to inform users about the way they should configure the driver to follow MySQL recommendations. Driver doesn't track how it's used in a JVM scope, it may be used to connect to different servers with different security configurations, connections may be reused in many ways, so there is no proper way and proper place to store the connection history you are asking for. The best way is just follow recommendations and configure driver properly. That's up to developer how the connection string is kept, for example you might consider to create a common conf file pointed by "useConfigs" c/J property.
[5 Dec 2016 11:48]
Matty Southall
Hi Alexander, Thanks for your comment. This does make perfect sense actually. Another solution would be to switch the logging off for MySQL in the servlet container. I have noticed MySQL is using its own logging implementation and not JDK logging library or SLF4J logging. Is there an easy way to make it use JDK logging so it can be configured?
[6 Dec 2016 9:50]
Alexander Soklakov
Hi Matty, You can replace default c/J logger by pointing to your own class via "logger" connection option, see http://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-configuration-properties... for details.