Hi FE !
Ai
git
前端面试题
前端小tip
  • vite
  • webpack
npm
  • vue2
  • vue3
react
GitHub
Ai
git
前端面试题
前端小tip
  • vite
  • webpack
npm
  • vue2
  • vue3
react
GitHub
  • 服务器搭建 h2

服务器搭建 h2

1.下载 h2 的 jar 包,使用 1.4.192 版本的,可以从 maven 仓库下载: https://repo1.maven.org/maven2/com/h2database/h2/1.4.192/h2-1.4.192.jar

在服务器目录下新建 h2 目录,将 h2 的 jar 包上传到这个目录中

或直接在服务器上执行

wget https://repo1.maven.org/maven2/com/h2database/h2/1.4.192/h2-1.4.192.jar

h2 目录下执行命令,启动 h2 的后台服务

java -cp h2-1.4.192.jar org.h2.tools.Server -web -webAllowOthers -tcp -tcpPort 19200 -tcpAllowOthers &

使用浏览器访问 http://你服务器地址:8082/ ,出现如下图页面,说明连接上了 h2 服务

默认的用户名 sa 密码 为空

ip:10.221.146.201 端口:19200 数据库/模式:~/test 用户名:sa 密码为空

jdbc 的 url 为:jdbc:h2:tcp://10.221.146.201:19200/~/test

jdbc:h2:tcp://vuereact.top:19200/~/test

Edit this page
最近更新: 2025/12/2 01:46
Contributors: qdleader
qdleader
本站总访问量 129823次 | 本站访客数 12人