connection has a remote Database

落花浮王杯 提交于 2019-12-03 08:20:13

There are two different server:

  • the Web Console server that is used to run the H2 Console tool (the GUI tool). It can be accessed by a browser only.
  • the TCP server that allows to connect an application that uses JDBC, when using the client/server mode (jdbc:h2:tcp://localhost/~/test)

The file .h2.server.properties is only used for the Web Console server. It only supports webAllowOthers=true. This file is not used by the TCP server.

To enable remote access to the TCP server, you need to start the TCP server using the option -tcpAllowOthers. To start both the Web Console server (the H2 Console tool) and the TCP server with remote connections enabled, you would need to use:

java -jar h2*.jar -web -webAllowOthers -tcp -tcpAllowOthers -browser

(this also starts a browser)

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!