Database not found, and IFEXISTS=true, so we cant auto-create it

后端 未结 17 3045
不思量自难忘°
不思量自难忘° 2020-12-15 06:20

I am getting error after opening the h2 database console. I enter database name but it is showing database not found error:

Database \"C:/Users/Barlek

17条回答
  •  没有蜡笔的小新
    2020-12-15 07:21

    I faced this issue recently, there were two issues.

    1. By default, it was not populated with in-memory database rather jdbc:h2:~/test.
    2. The db name I configured in the datasource was not test.

    when I changed the JDBC url to jdbc:h2:mem:{db-name-in-config}, it worked like a charm.

提交回复
热议问题