긍정적인 사고와 행동으로 선한 영향력을 줄 수 있도록

Spring

[Spring] java.sql.SQLSyntaxErrorException: Could not connect to address=(host=localhost)(port=3306)(type=master) : (conn=299) 오류 해결

리거니 2021. 10. 10. 21:16

Spring Boot 를 처음 시작하고 여러가지 설정을 한 후 서버를 키면

다음과 같은 에러가 뜨는 경우가 있다.

java.sql.SQLSyntaxErrorException: Could not connect to address=(host=localhost)(port=3306)(type=master) : (conn=299) Access denied for user 'RiGun'@'%' to database 'practice'

 

DB 연결에 실패하였다는 내용인데 , 기본적으로 DB와 연결하기 위해서는 

DB 내 접근권한을 설정해야한다 !! 

연결하고자 하는 DB 에 쿼리문을 작성해준다 .