I encourage you to export all the repository into a standard database like MySQL it is a very bad idea having into an embedded one like HSQL ( If the hardware shutdown incorrectly, might damage the database and then you will discover is not possible to recover anything ).
Well, let's go with the steps to recovering. First understanding HSQL only allow a single connection, that means when you have OpenKM started and connected to HSQL you are not allowed to set another connection. Than means, OpenKM must be stopped.
1- stop OpenKM
2- in the conf/server.xml you have the JDBC URL connection data
3- use a database client to connect with database
Like datastudio (
http://www.aquafold.com/aquadatastudio.html ) or into your tomcatXXX/lib folder you have the file name hsqldb.jar go ( open a terminal, and from the command line execute "java -jar hsqldb.jar" -> will be shown the client.
When you succeed on it, you might be interested in updating the OKM_USERS table.
Finally, that is a good time for planning migration to MySQL.