转载请注明出处:
1.查看用户
> SHOW USERS
运行示例:
> SHOW USERS user admin ---- ----- admin true readonly false monitor_user false >
2.创建用户
CREATE USER "myusername" WITH PASSWORD 'mypassword' WITH ALL PRIVILEGES
运行示例:
> CREATE USER "my_test" WITH PASSWORD 'my_password' WITH ALL PRIVILEGES > > SHOW USERS user admin ---- ----- admin true readonly false monitor_user false my_test true >
3.修改用户密码
SET PASSWORD FOR "my_test" = 'newpassword'
4.删除用户
DROP USER "my_test"
5.增加和查看用户权限
> GRANT WRITE ON "chronograf" TO "monitor_user" > > SHOW GRANTS FOR monitor_user database privilege -------- --------- chronograf WRITE >
增加用户写权限使用write;增加用户读权限使用read
标签: influxdb