[JAVA] How to create a database for H2 Database anywhere
System default when creating a new H2DB database
JDBC URL: jdbc: h2: ~ / test (C: \ Documents and Settings \ [username] \ test)
This is a solution when you want to create a directory directly under the C drive that can be accessed directly, but it does not work.
This time I would like to create a database named "test" in the "C: \ data" directory.
Solution 1 h1>
From the H2 console, enter "jdbc: h2: C: \ data \ test" in JDBC URL: and click Connect
- You may be able to create a database with Solution 1, but you may not be able to create it due to a strange error.
Solution 2 (when Solution 1 is not good) h1>
"Show hidden indicators" at the bottom right of the desktop
→ Right-click on "H2 Database Engine"
→「Create a new database...」
- Password: is required to be entered, so enter an appropriate one.
If you use Solution 2, you can delete the password by executing this SQL command after connecting to the database.
「ALTER USER sa SET PASSWORD '';」