A java.net.SocketException: Connection reset is a runtime exception that is thrown when a connection is reset. This can be caused by a variety of issues, such as:
A java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES) error typically indicates that the MySQL server is unable to authenticate the user with the provided username and password.
A java.net.ConnectException: Connection timed out error can occur when a Java application is unable to establish a network connection to the specified host.