Troubleshooting

[H2]: Database "xxx/test" not found, either pre-create it or allow remote database creation (not recommended in secure environments) [90149-224] 90149/90149

cwchoiit 2023. 10. 18. 08:13
728x90
반응형
SMALL
728x90
반응형
SMALL

이제 H2 Database가 버전이 올라가면서 데이터베이스가 없는 경우 자동으로 데이터베이스를 만들어주지 않는다.

그래서 콘솔에서 다음과 같은 에러를 볼 수 있다.

정말 간단하게 해결할 수 있는데, 우선 데이터베이스를 만들고자하는 경로는 나같은 경우 다음과 같다.

"~/h2/test" 이 경로에 "test"라는 데이터베이스를 만들거면 해당 경로에 이런 파일 하나를 만들어주면 된다.

"test.mv.db"

// ~/h2
touch test.mv.db

 

그러고 다시 Connect를 해보면 정상적으로 데이터베이스 접근할 수 있다. 

 

728x90
반응형
LIST