//Google AdSense

application.properties 

spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://호스팅받은주소:3306/tnwl6609?serverTimezone=UTC&characterEncoding=UTF8

프로퍼티에서 datasource url을 위와 같이 호스팅받은 주소로 설정했더니

db와 연결된 페이지를 호출할 때 마다 아래와 같은 오류가 발생.

### Error querying database.  Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: Access denied for user '아이디'@'아이피' (using password:YES)

 

application.properties

spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/tnwl6609?serverTimezone=UTC&characterEncoding=UTF8

datasource url을 호스팅 받은 주소에서 localhost로 바꾸어주니 잘 작동된다!

'Diary' 카테고리의 다른 글

batch책  (0) 2021.05.04
user block limit reached 오류  (0) 2020.07.01
api xml 형태 parsing 하기  (0) 2020.06.16
html에선 html include가 안된다구!?  (0) 2020.06.10

+ Recent posts