There are three types of InfluxDB users:
- Cluster Admin Cluster admin
- Database Admin DB Admin
- Database user
Cluster admin
Have the following permissions:
- Adding and deleting databases
- Add and delete database Admin and DB user users for any databases or give them read and write permissions.
- The Cluster Administrator does not have permission to query the data.
Default it has a username of root, password is also root account
The operations command for the Cluster Administrator is as follows:
# 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 '
The corresponding interface management functions are as follows:
Database admin
Database admin can add to or remove the databases admin and DB user from the current data base.
There are no permissions for the different libraries.
Database user
Database user is able to read and write to the current library. The database user cannot be adjusted.
The corresponding actions are as follows:
# database users, with a database name of site_dev# Add database usercurl-x POST ' http://localhost:8086/db/site_dev/users U=root&p=root ' -d ' {"Name": "Paul", "Password": "I write teh Docz"} ' # Delete database usercurl-x Delete '/HTTP/ Localhost:8086/db/site_dev/users/paul?u=root&p=root ' # Update user ' s passwordcurl-x POST ' http://localhost:8086/ Db/site_dev/users/paul?u=root&p=root '- d ' {"Password": "New Pass"} ' # get list of Database Userscurl '/HTTP Localhost:8086/db/site_dev/users?u=root&p=root ' # Add database admin privilegecurl-x POST ' http://localhost:8086/ Db/site_dev/users/paul?u=root&p=root '- d ' {"admin": true} ' # Remove database admin privilegecurl-x POST ' http:/ /localhost:8086/db/site_dev/users/paul?u=root&p=root '- d ' {"admin": false} '
Users of InfluxDB