2013-04-30 47 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