0

i create a spring boot project with a local database and the connection work correctly :

# DATASOURCE setting:
spring.datasource.url=jdbc:mysql://localhost:3306/t_anomalies
spring.datasource.username=root
spring.datasource.password=
spring.datasource.driverClassName=com.mysql.jdbc.Driver
# JPA :
spring.jpa.database=MYSQL
spring.jpa.show-sql=true
spring.jpa.hibernate.ddl-auto=update
spring.jpa.hibernate.naming.strategy=-
strategy=strategy=org.hibernate.cfg.ImprovedNamingStrategy
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect

but now i put my database in a web server i changed all the configuration (host,root,password) but i always received this message "Communications link failure"

# DATASOURCE setting:
spring.datasource.url=jdbc:mysql://newhost3:3306/t_anomalies
spring.datasource.username=newroot
spring.datasource.password=password
spring.datasource.driverClassName=com.mysql.jdbc.Driver
# JPA :
spring.jpa.database=MYSQL
spring.jpa.show-sql=true
spring.jpa.hibernate.ddl-auto=update
spring.jpa.hibernate.naming.strategy=-
strategy=strategy=org.hibernate.cfg.ImprovedNamingStrategy
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
hich
  • 3
  • 1
  • 3

1 Answers1

0

what are you using in 'newhost3' host name. verify connectivity with that host first.