'java.net.ConnectException: Connection refused Github action and MySQL
I'm building my project with Github action using sonar scanner so it fails at connection to database MySQL I tried to change useSSL=true and nothing changed these are the errors I'm getting:
Caused by: java.net.ConnectException: Connection refused (Connection refused)
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
Caused by: java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
Caused by: org.hibernate.exception.JDBCConnectionException: Unable to open JDBC Connection for DDL execution
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.exception.JDBCConnectionException: Unable to open JDBC Connection for DDL execution
I'm using Spring boot with maven multi modules and MySQL as database everything works fine in local and sonar scanner is working fine on sonarcloud but when i try to push the commit to github the action fails at these exceptions I really don't know what's wrong if any suggestions please.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|


