• 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

    how to build a New Data Source from SQL

    Development general discussion
    2
    3
    1.3k
    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.
    • C
      cuihe
      last edited by

      //your code here
      {
         "dataSources":[
            {
               "xid":"DS_64b30a4f-d8c2-4b8a-9978-1b9c085893b6",
               "name":"test_SQL",
               "enabled":false,
               "type":"SQL",
               "alarmLevels":{
                  "POLL_ABORTED":"URGENT",
                  "STATEMENT_EXCEPTION":"URGENT",
                  "DATA_SOURCE_EXCEPTION":"URGENT"
               },
               "purgeType":"YEARS",
               "updatePeriodType":"SECONDS",
               "connectionUrl":"192.168.61.191:3306",
               "driverClassname":"MySQL",
               "password":"1234",
               "rowBasedQuery":false,
               "selectStatement":"select * from biao;",
               "updatePeriods":5,
               "username":"root",
               "editPermission":"",
               "purgeOverride":false,
               "purgePeriod":1
            }
         ]
      }
      

      It's not clear what "driverClassname" means.
      The database I use is MySQL, what should i type in ? "com.mysql.jdbc.Driver"(same error below)?

      when I click "SQL Statement Testing", It shows an error: class java.lang.ClassNotFoundException: MySQL

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

        Hi cuihe,

        You should see mysql-connector.jar (with a version number) among the JAR files in the Mango/lib/ directory. It appears you have types the driver classpath correctly here, but can you verify that that's what was in the data source's drive input, com.mysql.jdbc.Driver and that your hit save before trying the utility?

        The contextual help in the ? in the old UI next to the data source name or in the new UI in the top right corner does provide same.

        1 Reply Last reply Reply Quote 0
        • C
          cuihe
          last edited by

          I was not so clear with this thing, but it do solved!

          here is my solution:
          "connectionUrl":"jdbc:mysql://localhost:3306/test",
          "driverClassname":"com.mysql.jdbc.Driver",

          Note: replace "localhost" "3306" "test" if needed.

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