Set TS authorized, improve security, for the specified user has permissions to access the database data, TS Default user is divided into ordinary users and administrator users, permissions are divided into Read,write,all privileges three kinds of permissions
There are 2 ways to add users via terminal or Web:
The process of opening a user right:
1. After installing the database, log in by default: [[email protected] ~]# influx
2. Add Users
CREATE USER "Influxdb" with PASSWORD ' root123 ' and all privileges
3. Modify the configuration file:
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/8B/68/wKiom1hNNznAKuzZAAC7j5wzLNI073.png-wh_500x0-wm_3 -wmp_4-s_2089889817.png "title=" 1111.png "alt=" Wkiom1hnnznakuzzaac7j5wzlni073.png-wh_50 "/>
4. Restart the service after setting up
5. Web Authentication Login Data:
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/8B/65/wKioL1hNN-XxJyjoAAB1TyTlUPg870.png-wh_500x0-wm_3 -wmp_4-s_1381295699.png "title=" 1111.png "alt=" Wkiol1hnn-xxjyjoaab1tytlupg870.png-wh_50 "/>
Note that if this is not logged on with admin privileges, the error
Server returned Error:error authorizing Query:dlan not authorized to execute statement ' SHOW DATABASES ', requires admin Privilege
Terminal login:
Influx-host ' localhost '-port ' 8086 '-username ' admin '-password ' root123 '
The current test has encountered a problem:
Add a normal user, authorization write or read or all will not take effect, the normal way to create a user login will prompt:
[Email protected] ~]# influx-host ' 192.168.1.114 '-port ' 8086 '-username ' dlan2 '-password ' root123 '
Visit https://enterprise.influxdata.com to register for updates, InfluxDB Server management, and monitoring.
Connected to http://192.168.1.114:8086 version 0.13.0
InfluxDB Shell version:0.13.0
> Show Databases
Err:error authorizing query:dlan2 not authorized to execute statement ' SHOW DATABASES ', requires admin privilege
Warning:it is possible this error was due to not setting a database.
Please set a database with the command "use <database>".
>Show grants for dlan2
DatabasePrivilege
mytabREAD #权限修改依然无法访问, same as prompt error
According to the current test can only use the admin permission to operate the database, or need to set there, need to verify,,,,
To delete a user:
Drop User Dlan
User authorization:
Grant all on MyDB to Dlan
User authorization can only be performed on a single measurement
Delete permissions:
Revoke read on mydb from Dlan
Seemingly currently open auth only through admin Rights Management Library, other waiting for verification
This article is from the "DBSpace" blog, so be sure to keep this source http://dbspace.blog.51cto.com/6873717/1881705
INFLUXDB User Rights Chapter