New user from ADMIN group

  1. Run the following to create a new account.
    1. {
        "api": "admin",
        "action": "createAccount",
        "params": {
          "username": "ADMIN2",
          "password": "ADMINADMINADMINADMIN"
        },
        "authToken": "replaceWithAuthTokenFromCreateSession"
      }
  2. Run the following to assign the ADMIN role to the newly created account.
    1. {
        "api": "admin",
        "action": "assignRolesToAccounts",
        "params": {
          "add": [
            {
              "roleNames": [
                "ADMIN"
              ],
              "usernames": [
                "ADMIN2"
              ]
            }
          ]
        },
        "authToken": "replaceWithAuthTokenFromCreateSession"
      }
  3. Run the following in command prompt to grant permissions in SQL.
    1. GRANT ALL PRIVILEGES ON mqtt_client TO ADMIN2;
      GRANT ALL PRIVILEGES ON mqtt_client_history TO ADMIN2;
      GRANT ALL PRIVILEGES ON mqtt_topic TO ADMIN2;
      GRANT ALL PRIVILEGES ON mqtt_subscription_history TO ADMIN2;
      COMMIT WORK;