1

我正在尝试独立运行和访问 HSQLDB 没有运气..

我启动了数据库,得到了以下输出:

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

我正在尝试使用以下 URL 在 java 中访问它:

jdbc:hsqldb:hsql://localhost/xdb

但是,如果您查看控制台,我会收到以下错误:

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

那么有人可以告诉我默认数据库名称或如何创建一个吗?

4

1 回答 1

3

How-To说您必须创建一个 server.properties 文件并将其放在您安装 hsqldb 的目录中,该文件包含:

server.database.0=file.hsqldb/dirWhereDbLives   
server.dbname.0=xdb                           
于 2013-04-30T19:49:25.540 回答