Need support for MySQL disconnected automatically
Posted by: Nataraja mani
Date: March 05, 2019 02:01AM

Dear team,

I am using the MysqL version 5.7.25 and CENT OS and Tomcat 7 for My java Web Application.

I installed the Mysql and tomcat 7 in the Same Linux PC (CentOS).

When running application , MySQL Database suddenly disconnected.

At that time ,When I am trying to connect MySQL through command prompt ,I am getting following Error .

'can't connect to local MYSQL Server through socket '/var/lib/mysql/mysql.sock' (2).

For that time , I added the following Line to My.cnf file.

bind-address=localhost

and restarted the Mysql Service.

that works fine . but I don't know Is it correct solution?

please advice me , what is the correct solution ?

Options: ReplyQuote


Subject
Written By
Posted
Need support for MySQL disconnected automatically
March 05, 2019 02:01AM


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.