Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Authority Management of 02-influxdb

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

01-InfluxDB introduction Please add a link description

Authority Management of 02-influxdb

Introduction to backup and recovery of 03-Influxdb

In fact, the permission syntax of influxdb is basically similar to that of mysql. After reading it, you can basically understand it.

Authorization syntax

Create user: CREATE USER WITH PASSWORD''Authorization permission: GRANT [READ,WRITE,ALL] ON TO create and authorize: CREATE USER WITH PASSWORD' 'WITH ALL PRIVILEGES cancel Authorization: REVOKE ALL PRIVILEGES FROM change password: SET PASSWORD FOR =' 'Delete user: DROP USER

Enable login authentication

Vim / etc/influxdb/influxdb.conf

[http] auth-enabled = true

[root@localhost tmp] # influx

Connected to http://localhost:8086 version 1.7.1InfluxDB shell version: 1.7.1Enter an InfluxQL query > show databasesERR: unable to parse authentication credentialsWarning: It is possible this error is due to not setting a database.Please set a database with the command "use". > authusername: monitorpassword: > show databasesname: databasesname----_internalzabbixtelegrafchronograf > quit authorization operation

1. Create a superuser

Create user: monitor

Password: zabbix

Permissions: full permissions (superuser)

Create user monitor with password 'zabbix' with all privileges

two。 Create a read-only user

User: monitor_ro

Database: monitordb

Permissions: specify read-only permissions for the database

Create user monitor_ro with password 'zabbix_apipwd'

Grant read on monitordb to monitor_ro

3. Create a user that can write

User: monitor_rw

Database: monitordb

Permissions: specify write permissions for the database

Create user monitor_rw with password 'zabbix_apipwd'

Grant write on monitordb to monitor_rw

4. Cancel user authorization

Revoke user authorization:

REVOKE ALL PRIVILEGES FROM monitor_rw

5. View all users

SHOW USERS

User admin

Monitor true

Monitor_ro false

Monitor_rw false

6. Delete user

DROP USER monitor_rw

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report