H2 web console
所属分类 H2
浏览量 228
H2 web console
基于web的 jdbc 客户端
默认端口 8082
指定端口 -webPort 8088
java -cp h2-2.1.210.jar org.h2.tools.Console -web -webPort 8088 -webAllowOthers
http://127.0.0.1:8088/
nohup java -cp h2-2.1.210.jar org.h2.tools.Server -tcp -tcpAllowOthers -tcpPort 9400 &
jdbc:h2:tcp://localhost:9400//PATH/data/db1/db1
jdbc:h2:file:/Users/dugang/db1/db1
Database "/Users/dugang/db1/db1" not found, either pre-create it or allow remote database creation (not recommended in secure environments) [90149-210] 90149/90149 (Aiuto)
org.h2.jdbc.JdbcSQLNonTransientConnectionException: Database "/Users/dugang/db1/db1" not found, either pre-create it or allow remote database creation (not recommended in secure environments) [90149-210]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:697)
at org.h2.message.DbException.getJdbcSQLException(DbException.java:496)
at org.h2.message.DbException.get(DbException.java:227)
at org.h2.message.DbException.get(DbException.java:203)
at org.h2.engine.Engine.throwNotFound(Engine.java:189)
at org.h2.engine.Engine.openSession(Engine.java:72)
at org.h2.engine.Engine.openSession(Engine.java:222)
at org.h2.engine.Engine.createSession(Engine.java:201)
at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:338)
at org.h2.jdbc.JdbcConnection.< init >(JdbcConnection.java:122)
at org.h2.util.JdbcUtils.getConnection(JdbcUtils.java:288)
at org.h2.server.web.WebServer.getConnection(WebServer.java:807)
at org.h2.server.web.WebApp.login(WebApp.java:1033)
at org.h2.server.web.WebApp.process(WebApp.java:226)
at org.h2.server.web.WebApp.processRequest(WebApp.java:176)
at org.h2.server.web.WebThread.process(WebThread.java:153)
at org.h2.server.web.WebThread.run(WebThread.java:102)
at java.lang.Thread.run(Thread.java:750)
可以先创建数据库
String driver = "org.h2.Driver";
String dbDataFileDir = "/Users/dugang/db1";
String dbName = "db1";
String url = "jdbc:h2:file:"+dbDataFileDir+dbName;
Class.forName(driver);
Connection cn = DriverManager.getConnection(url);
System.out.println("cn="+cn);
上一篇
下一篇
JDK 和 openJDK 区别
Flink CDC 3.0 简介
Skywalking简介
杭州市内游玩交通
Kube-Install 一键离线安装多K8S集群
flink checkpoint 检查点