title: H2 Database Connection
body: <p>I need to ping H2 Database in Java.</p>
  
  <p>In order to do that I'm sending a GET request to ip_db:port:</p>
  
  <pre><code>HttpUriRequest request = new HttpGet(url);
  HttpResponse response = client.execute(request);
  </code></pre>
  
  <p>But all I get is ClientProtocolException.</p>
  
  <p>When I try to open ip_db:port in Firefox, I get the following info (slightly edited for readability):</p>
  
  <pre><code>90047BVersion mismatch, driver version is "0" but server version is "12"яяяя_їXorg.h2.jdbc.JdbcSQLException: Version mismatch, driver version is "0" but server version is "12" [90047-173]
      at org.h2.message.DbException.getJdbcSQLException(DbException.java:331)
      at org.h2.message.DbException.get(DbException.java:171)
      at org.h2.server.TcpServerThread.run(TcpServerThread.java:88)
      at java.lang.Thread.run(Thread.java:724)
  </code></pre>
  
  <p>Here's H2 log:</p>
  
  <pre><code>Exception in thread "main" org.h2.jdbc.JdbcSQLException: Connection is broken: "java.net.ConnectException: Connection refused: my_ip" [90067-173]
          at org.h2.message.DbException.getJdbcSQLException(DbException.java:331)
          at org.h2.message.DbException.get(DbException.java:160)
          at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:407)
          at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:295)
          at org.h2.jdbc.JdbcConnection.&lt;init&gt;(JdbcConnection.java:105)
          at org.h2.jdbc.JdbcConnection.&lt;init&gt;(JdbcConnection.java:90)
          at org.h2.Driver.connect(Driver.java:73)
          at java.sql.DriverManager.getConnection(DriverManager.java:571)
          at java.sql.DriverManager.getConnection(DriverManager.java:215)
          at org.h2.tools.CreateCluster.process(CreateCluster.java:137)
          at org.h2.tools.CreateCluster.runTool(CreateCluster.java:85)
          at org.h2.tools.CreateCluster.main(CreateCluster.java:52)
  </code></pre>
  
  <p>What do I need to do to ping the database?</p>