H2 database control: Difference between revisions

Content deleted Content added
imported>Kymara
No edit summary
imported>Kymara
No edit summary
Line 1:
== FiddlingConnecting withto the H2 Database ==
Make sure the game server is '''not running''' (using '''CTRL+c''' at the server command window). Otherwise you'll get this error later:
 
Line 13:
[[File:H2dbGuide002.png]]
 
'''Alternatively,''' you can see it with any other web browser by entering the following URL:
 
http://localhost:8082/
===Configuration parameters===
 
At the ''URL JDBC:'' text field, copy and paste this:
 
Line 35:
Now you should have been given access to the game database.
 
==Exploring the H2 database==
For starters, you can see the accounts in the database by clicking on the ACCOUNT table name on the left graphical tree:
 
Line 53 ⟶ 54:
Feel free to experiment from here on. :) Anything other than a SELECT should be used with caution on production environments!
 
For a list of H2 commands see http://www.h2database.com/html/grammar.html
 
== Stop the H2 database ==
To stop the database engine use the same method as with the game server: type '''CTRL+c''' at the command window.
 
== Backup the H2 database ==
For a list of H2 commands see http://www.h2database.com/html/grammar.html
You can copy the files in ~/stendhal/database but the server must be '''stopped'''.
Otherwise from within the h2 environment, as above, use command
BACKUP to 'file.zip'