Re: Need support for MySQL disconnected automatically
Posted by: Filipe Silva
Date: March 06, 2019 07:06AM

What version of Connector/J are you using?

Mind that Connector/J doesn't support Unix sockets by default.

From the information you provided it is not clear how exactly is the MySQL server being disconnected. I would need some more details in order to help you:

- Is this after some (idle) time while the webapp is running?
- What kind of exceptions are you getting?
- Was there any MySQL server reboot in the meantime?
- Are you using some kind of connection pooling in the webapp?
- How does the connection string look like in the webapp?

Regarding the `mysql.sock` error you've got, I'd say it must have been some glitch in you system or misconfiguration. Adding `bind-address=localhost` shouldn't have any effect on this. Possibly the mysql client was reading a my.cnf that had a different path than the one for the server at some point?

The option `bind-address=localhost` will block any other connection attempts not starting from "localhost", though. And mind that the "host" information in the users definitions must be able to match "localhost" in order to authenticate successfully now.

Please provide as many details as possible so that we may continue helping you.

Options: ReplyQuote

Written By
Re: Need support for MySQL disconnected automatically
March 06, 2019 07:06AM

Sorry, you can't reply to this topic. It has been closed.

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.