2013-04-30 53 views
1

我試圖運行,沒有運氣訪問HSQLDB獨立訪問HSQLDB獨立..試圖運行,沒有運氣

我啓動的數據庫,我得到了以下的輸出:

@wcmisdlin07 ~/Downloads/hsqldb-2.2.9/hsqldb/bin> ./runServer.bat 
: No such file or directory: ..data 
[[email protected]]: [Thread[main,5,main]]: checkRunning(false) entered 
[[email protected]]: [Thread[main,5,main]]: checkRunning(false) exited 
[[email protected]]: Startup sequence initiated from main() method 
[[email protected]]: Could not load properties from file 
[[email protected]]: Using cli/default properties only 
[[email protected]]: Initiating startup sequence... 
[[email protected]]: Server socket opened successfully in 7 ms. 
[[email protected]]: Database [index=0, id=0, db=file:test, alias=] opened sucessfully in 690 ms. 
[[email protected]]: Startup sequence completed in 698 ms. 
[[email protected]]: 2013-04-30 13:59:44.616 HSQLDB server 2.2.9 is online on port 9001 
[[email protected]]: To close normally, connect and execute SHUTDOWN SQL 
[[email protected]]: From command line, use [Ctrl]+[C] to abort abruptly 

和我嘗試使用下面的URL來訪問它在Java:

jdbc:hsqldb:hsql://localhost/xdb 

但如果你看看我收到以下錯誤控制檯:

[[email protected]]: [Thread[HSQLDB Connection @343d0d2b,5,HSQLDB Connections @7e896e10]]: database alias=mydb does not exist 
[[email protected]]: [Thread[HSQLDB Connection @7d52cb9a,5,HSQLDB Connections @7e896e10]]: database alias=test does not exist 
[[email protected]]: [Thread[HSQLDB Connection @5c1fbd9,5,HSQLDB Connections @7e896e10]]: database alias=xdb does not exist 
[[email protected]]: [Thread[HSQLDB Connection @231d06f0,5,HSQLDB Connections @7e896e10]]: database alias=testdb does not exist 
[[email protected]]: [Thread[HSQLDB Connection @545c498e,5,HSQLDB Connections @7e896e10]]: database alias=xdb does not exist 

那麼有人可以告訴我默認的數據庫名稱或如何創建一個?

回答

3

How-To說,你必須創建一個server.properties文件,並把它放在你安裝HSQLDB到,該文件包含目錄:

server.database.0=file.hsqldb/dirWhereDbLives 
server.dbname.0=xdb       
+0

正確答案。使用你現在的設置,連接URL是'jdbc:hsqldb:hsql:// localhost /' – fredt 2013-04-30 21:04:40