반응형

Languages/SQL 10

[ERROR] org.springframework.security.authentication.InternalAuthenticationServiceException

org.springframework.security.authentication.InternalAuthenticationServiceException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: The server time zone value '���ѹα� ǥ�ؽ�' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the 'serverTimezone' configuration property) to use a more specific time zone value ..

Languages/SQL 2022.05.23

[Error] H2 데이터베이스 최신 버전

H2 데이터베이스를 다시 설치하면서 이전에 잘 동작했던 테스트 코드가 실행되지 않았다. 💕 해결 2.1.210, 2.0.206 두 버전 다 최신 버전이라서 잘 안됨. 1.4.200 버전을 쓰니까 잘 된다. 최신 버전 사용하면 이전에 잘 되던 코드도 안 되는 경우가 많다는 것을 느꼈다😂 첫 번째 문제) user가 identifier라면서 테이블명이 user로 안 만들어진다. 엔티티에 @Table(name="users")도 붙여봤지만, 다른 에러가 뜬다. 두 번째 문제) id가 null insert into post (id, created_date, modified_date, author, content, title, view) values (null, ?, ?, ?, ?, ?, ?) @GeneratedVa..

Languages/SQL 2022.03.31

[Error] Public Key Retrieval is not allowed

java.sql.SQLNonTransientConnectionException: Public Key Retrieval is not allowed application.properties에서 useSSL=true로 해줌 그 전에는 false였음 MySQL 8.0 이상부터 SSL로 연결해야 한다. SSL은Secure Sockets Layer이다. 데이터를 암호화해서 보안을 유지 spring.datasource.url=jdbc:mysql://localhost:3306/board?useSSL=true 참고 👇 https://deeplify.dev/database/troubleshoot/public-key-retrieval-is-not-allowed [Mysql] Public key retrieval is not..

Languages/SQL 2022.03.29

[Error] Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column

delete from 테이블명; Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disable safe mode, toggle the option in Preferences -> SQL Editor and reconnect. 삭제 쿼리를 실행하니 다음과 같은 에러가 뜸 ✨ 해결 where 없이 다 삭제할 때 1. Safe Updates (rejects UPDATEs and DELETEs with no restrictions) 체크 해제 2. workbench 다시 시작 3. 삭제 쿼리 다시 실행하면 잘 된다. 참고 👇 https://l..

Languages/SQL 2022.03.19

[Error] Invalid use of NULL value

Invalid use of NULL value column을 not null로 제약 조건을 변경하려고 했더니 생긴 에러 이 문제의 원인은 해당 column이 현재 null 값을 가지고 있기 때문이다. update문으로 null값에 임의의 값을 넣어준다. update 테이블명 set 컬럼명=값 where 컬럼명 is null; 그 후 not null로 변경하면 성공 alter table 테이블명 modify column 컬럼명 타입 not null; 참고 https://stackoverflow.com/questions/22971586/mysql-alter-table-causes-error-invalid-use-of-null-value/22971654 MySQL Alter table causes Error:..

Languages/SQL 2021.08.06

[Error] nested exception is java.sql.SQLException: Unable to load authentication plugin 'caching_sha2_password'.] with root cause

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: Unable to load authentication plugin 'caching_sha2_password'.] with root cause 위에는 에러 내용 USE 데이터베이스명입력;..

Languages/SQL 2021.06.04

[Error] nested exception is java.sql.SQLException: Access denied for user '계정명'@'localhost' (using password: YES)] with root cause

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 이런 에러가 떴다. 계정 권한을 추가해..

Languages/SQL 2021.06.03

join

https://sql-joins.leopard.in.ua/ SQL Joins Visualizer Please select how do you want to do SQL JOIN between two table sql-joins.leopard.in.ua join을 시각적으로 보여주고 코드도 복붙 할 수 있다. 색칠된 부분을 기준으로 join한다. select * from A left join B on A.key=B.key A에 A와 key가 같은 B의 값들을 붙인다. right join도 방향만 다를뿐 방법이 같음. left join은 정말 많이 사용한다!!!!!!!!!!!!!!!! select * from A inner join B on A.key=B.key inner join은 A와 B의 공통된 부분을..

Languages/SQL 2021.05.25

H2 데이터베이스 설치

http://h2database.com/html/download-archive.html Archive Downloads h2database.com H2 데이터베이스를 다운로드하는 곳 최신 버전보다 이전 버전을 사용하자. 최신 버전을 사용해보니 에러가 많다 😥😥 1. cmd에서 h2 폴더의 bin으로 이동한다. cd C:\Program Files (x86)\H2\bin 2. h2.bat을 치면 H2 데이터베이스를 사용할 수 있는 페이지가 뜬다. 잘 안 열리면 앞에만 IP를 localhost로 바꾼다. JDBC URL은 jdbc:h2:~/test다. 8082포트가 막힐 경우에는(java.net.BindException) cmd에서 netstat -ano|find "8082" 한 후에 taskkill /f /..

Languages/SQL 2020.12.12
반응형