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

sonal barlekar picture sonal barlekar · Mar 26, 2019 · Viewed 35.5k times · Source

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/Barlekar/onlineshoppings" not found, and IFEXISTS=true, so we cant auto-create it [90146-199] 90146/90146 (Help)

org.h2.jdbc.JdbcSQLNonTransientConnectionException: Database "C:/Users/Barlekar/onlineshoppings" not found, and IFEXISTS=true, so we cant auto-create it [90146-199]

Answer

Ivan Xue picture Ivan Xue · Jun 11, 2019

If you are dealing with the Spring Boot project, please change the JDBC URL jdbc:h2:~/test to jdbc:h2:mem:testdb in the login page, which is the default URL configured by Spring Boot.