H2内存数据库连接不上服务器:如我本机做H2内存数据库,我自己通过
Class.forName("org.h2.Driver");
String url ="jdbc:h2:tcp://192.168.200.105/~/test";
Connection con =DriverManager.getConnection(url,"sa", "");
可连接的上;我用另外一台,则报错:Remote connections to this server are not allowed, see -tcpAllowOthers [90117-137],请各位大虾帮忙,谢谢1
Class.forName("org.h2.Driver");
String url ="jdbc:h2:tcp://192.168.200.105/~/test";
Connection con =DriverManager.getConnection(url,"sa", "");
可连接的上;我用另外一台,则报错:Remote connections to this server are not allowed, see -tcpAllowOthers [90117-137],请各位大虾帮忙,谢谢1
指定 -tcpAllowOthers 参数
server = Server.createTcpServer(new String[] {"-tcpAllowOthers","true", "-tcpPort", "9092" });
server.start();