Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: Access denied for user 'jeong'@'localhost' (using password: YES)] with root cause
이런 에러가 떴다. 계정 권한을 추가해줘야한다.
💗 해결
1. 사용자를 추가하며 비밀번호까지 설정한다.
CREATE USER 계정명입력@localhost identified by '비밀번호';
2. 계정에 권한 부여
GRANT ALL PRIVILEGES ON 데베명입력.* TO 계정명입력@localhost;
3. 권한 적용
flush privileges;
4. 권한 확인
SHOW GRANTS FOR 계정명@localhost;
참고 👉 https://nickjoit.tistory.com/144
반응형
'Languages > SQL' 카테고리의 다른 글
[Error] Data too long for column 'password' at row 1 (0) | 2022.03.16 |
---|---|
[Error] Invalid use of NULL value (0) | 2021.08.06 |
[Error] nested exception is java.sql.SQLException: Unable to load authentication plugin 'caching_sha2_password'.] with root cause (0) | 2021.06.04 |
join (0) | 2021.05.25 |
H2 데이터베이스 설치 (0) | 2020.12.12 |