웹개발/Database
[Mysql] Could not get JDBC Connection 관련 2가지 에러 해결방법
kmhan
2020. 2. 11. 21:01
728x90
반응형
spring에서 JUnit Test 실행시 console에 출력된 에러 해결방법입니다.
1. Could not get JDBC Connection; nested exception is java.sql.SQLException: Unable to load authentication plugin 'caching_sha2_password'.
해결방법
1) mysql -u root -p 2) password 입력 3) use mysql; 4) alter user '계정입력'@'localhost' identified with mysql_native_password by '비밀번호입력'; 5) flush privileges; |
※ 나의 경우 이것과 상관없이 연결시 생성한 id로 테스트하였고 테스트 id를 root로 변경하니 에러 통과되었음
2. Could not get JDBC Connection; nested exception is java.sql.SQLException: Unknown system variable 'query_cache_size'
해결방법
pom.xml에서 artifactId가 'mysql-connector-java'인 소스의 version이 설치 버전과 일치해야함 |
출처: https://yzink.tistory.com/entry/ERROR-MySQL-authentication-plugin-cachingsha2passwordquerycachesize [yangD LAB]
728x90
반응형