zoukankan      html  css  js  c++  java
  • InfluxDB 的用户

    InfluxDB 的用户有三种:

    • cluster admin   集群admin
    • database admin  数据库admin
    • database user  数据库用户

    cluster admin

    具有下面权限:

    • 增加和删除数据库
    • 对任何数据库的database admin 和 database user 用户增加和删除,或者给他们赋予读写权限。
    • 集群管理员没有查询数据的权限。

    默认它有一个用户名是 root, 密码也是 root的 账户

    集群管理员的操作命令如下:

    # get list of cluster admins curl 
    curl 'http://localhost:8086/cluster_admins?u=root&p=root'

    # add cluster admin
    curl -X POST 'http://localhost:8086/cluster_admins?u=root&p=root'
      -d '{"name": "paul", "password": "i write teh docz"}'

    # update cluster admin password
    curl -X POST 'http://localhost:8086/cluster_admins/paul?u=root&p=root'
      -d '{"password": "new pass"}'

    # delete cluster admin
    curl -X DELETE 'http://localhost:8086/cluster_admins/paul?u=root&p=root'

    对应的界面管理功能如下:

    image

    database admin

    database admin 可以对当前数据库增加或者删除database admin 和 database user。
    对不同的库则是没有权限的。

    database user

    database user能够对当前库进行读写操作。不能对数据库用户进行调整,

    对应的操作如下:

    # Database users, with a database name of site_dev
    
    # add database user
    curl -X POST 'http://localhost:8086/db/site_dev/users?u=root&p=root' 
      -d '{"name": "paul", "password": "i write teh docz"}'
    
    # delete database user
    curl -X DELETE 'http://localhost:8086/db/site_dev/users/paul?u=root&p=root'
    
    # update user's password
    curl -X POST 'http://localhost:8086/db/site_dev/users/paul?u=root&p=root' 
      -d '{"password": "new pass"}'
    
    # get list of database users
    curl 'http://localhost:8086/db/site_dev/users?u=root&p=root'
    
    # add database admin privilege
    curl -X POST 'http://localhost:8086/db/site_dev/users/paul?u=root&p=root' 
      -d '{"admin": true}'
    
    # remove database admin privilege
    curl -X POST 'http://localhost:8086/db/site_dev/users/paul?u=root&p=root' 
      -d '{"admin": false}'
  • 相关阅读:
    [POJ1724]ROADS
    表达式求值
    [NOIp2017提高组]奶酪(BFS)
    [NOIp2012提高组]Vigenère 密码
    [NOIp2012提高组]国王游戏
    [POJ1321]棋盘问题
    [POJ3009]Curling2.0
    垃圾陷阱
    2019CSP day1t2 括号树
    2019CSP游记
  • 原文地址:https://www.cnblogs.com/ghj1976/p/4110605.html
Copyright © 2011-2022 走看看