From a program, I created a H2 database without specifying any user or password in the JDBC URL.
Now I\'m trying to access that database with the Script tool. The doc sa
in my case i had mispelled the username
and password
properties, so i assume spring tried to use the defaults which didn't work
This might work:
name = "sa"
password = ""
In your application.properties file please add
spring.datasource.username=username
spring.datasource.password=password
hope it helps
Note: If you are getting this error when trying to login via Intellij, you need to enable MIXED_MODE. See this answer for more details: Connect to H2 database using IntelliJ database client
In case you got stuck with the default non-blank user when running the client, the full set of parameters will get you past that:
java -cp <path_to_h2>\h2.jar org.h2.tools.Shell -url "jdbc:h2:file:<jdbc_url>" -driver "org.h2.Driver" -user "" -password ""
try this:
java -cp h2*.jar org.h2.tools.Script -user "sa" -password "" -url "jdbc:h2:path_to_your_db_file"