新聞中心
01-InfluxDB介紹請?zhí)砑渔溄用枋?/p>
成都創(chuàng)新互聯(lián)公司IDC提供業(yè)務(wù):BGP機房服務(wù)器托管,成都服務(wù)器租用,BGP機房服務(wù)器托管,重慶服務(wù)器租用等四川省內(nèi)主機托管與主機租用業(yè)務(wù);數(shù)據(jù)中心含:雙線機房,BGP機房,電信機房,移動機房,聯(lián)通機房。02-influxdb的權(quán)限管理
- 03-Influxdb的備份與恢復(fù)
介紹
其實influxdb的權(quán)限語法和mysql基本相似,看完以后你基本就能了解;
授權(quán)語法
- 創(chuàng)建用戶:CREATE USER
WITH PASSWORD ' ' - 授權(quán)權(quán)限:GRANT [READ,WRITE,ALL] ON
TO - 創(chuàng)建并授權(quán):CREATE USER
WITH PASSWORD ' ' WITH ALL PRIVILEGES - 取消授權(quán):REVOKE ALL PRIVILEGES FROM
- 修改密碼:SET PASSWORD FOR
= ' ' - 刪除用戶:DROP USER
開啟登錄認證
vim /etc/influxdb/influxdb.conf
[http]
auth-enabled = true
[root@localhost tmp]# influx
Connected to http://localhost:8086 version 1.7.1
InfluxDB shell version: 1.7.1
Enter an InfluxQL query
> show databases
ERR: unable to parse authentication credentials
Warning: It is possible this error is due to not setting a database.
Please set a database with the command "use ".
> auth
username: monitor
password:
> show databases
name: databases
name
----
_internal
zabbix
telegraf
chronograf
> quit
授權(quán)操作
1.創(chuàng)建超級用戶
創(chuàng)建用戶:monitor
密碼:zabbix
權(quán)限:全部權(quán)限(超級用戶)
create user monitor with password 'zabbix' with all privileges
2.創(chuàng)建只讀用戶
用戶:monitor_ro
數(shù)據(jù)庫:monitordb
權(quán)限:指定數(shù)據(jù)庫的只讀權(quán)限
create user monitor_ro with password 'zabbix_apipwd'
grant read on monitordb to monitor_ro
3.創(chuàng)建可以寫用戶
用戶:monitor_rw
數(shù)據(jù)庫:monitordb
權(quán)限:指定數(shù)據(jù)庫的寫權(quán)限
create user monitor_rw with password 'zabbix_apipwd'
grant write on monitordb to monitor_rw
4.取消用戶授權(quán)
取消用戶授權(quán):
REVOKE ALL PRIVILEGES FROM monitor_rw
5.查看所有用戶
SHOW USERS
user adminmonitor true
monitor_ro false
monitor_rw false
6.刪除用戶
DROP USER monitor_rw
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機、免備案服務(wù)器”等云主機租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。
文章標(biāo)題:02-influxdb的權(quán)限管理-創(chuàng)新互聯(lián)
網(wǎng)頁路徑:http://fisionsoft.com.cn/article/gidsh.html