• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    H2 database

    User help
    2
    5
    2.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      LarryE
      last edited by

      How do I go about running the h2-console on a laptop and connect to the database on a server?
      Mango and the db are on the server. Do I need to install the h2-console on both?

      1 Reply Last reply Reply Quote 0
      • phildunlapP
        phildunlap
        last edited by phildunlap

        Hi Larry,

        The easiest way is to launch the h2-web-console script in Mango/bin/ from the device that has the database, and add -webAllowOthers if you will be accessing it from a different machine (which you will be, it sounds).

        I don't believe there is a means to connect a web console started on your machine to the remote database.

        Here's a help document relevant to H2 and using the web console: http://help.infiniteautomation.com/support/solutions/articles/14000022661-about-the-h2-database

        1 Reply Last reply Reply Quote 0
        • L
          LarryE
          last edited by

          I am having a problem with the h2 db. Mango is running on a server and when I run the h2-console on the server it show that it connects to the db, but the db is an empty one just like the test db. When I saw this I logged on to mango and started the SQL console and ran the get tables and it show the current database tables? I ran the (select * from DATAPOINTS) query and all the data points are there.
          But when I try to connect from the h2 console with (jdbc:h2:tcp://192.168.1.10/IT Dept Installs/Mango Automation 2.7.10 Enterprise Demo/databases/mah2.h2.db) Path and file It show a new test type table structure. Not sure how to connect to the real db????????

          1 Reply Last reply Reply Quote 0
          • phildunlapP
            phildunlap
            last edited by phildunlap

            You need to get the connection string right; it has a somewhat pesky behavior of creating an empty database in the location specified by the connection string, which is probably what you're experiencing. Running h2-web-console the server with the database, you'll navigating in your browser to http://[ip]:[port defined in h2-web-console script]/ .

            Your connection string should be jdbc:h2:/path/to/Mango/databases/mah2

            1 Reply Last reply Reply Quote 0
            • L
              LarryE
              last edited by

              . Phil The trouble it turns out was the h2-*.jar file being on my computer not on the server. After I moved it the console connected with no errors and I can see all the data points from my computer. Again thanks for all your help.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post