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

解决方案 »

  1.   

    启动命令:java -cp h2.jar org.h2.tools.Server -tcpAllowOthers
    指定 -tcpAllowOthers 参数
      

  2.   

    我也出现过类似的情况的,我当时出现这样的问题是jar包的版本和服务器的版本不一样,你看看你的呢
      

  3.   

    Server server;
    server = Server.createTcpServer(new String[] {"-tcpAllowOthers","true", "-tcpPort", "9092" });
    server.start();