# rfc3339 tells InfluxDB to return timestamps in RFC3339 format (YYYY-MM-DDTHH:MM:SS.nnnnnnnnnZ)
Auth
Auth User
1
auth
Authenticate Telegraf requests to InfluxDB
1 2 3 4 5
## Write timeout (for the InfluxDB client), formatted as a string. ## If not provided, will default to 5s. 0s means no timeout (not recommended). timeout = "5s" username = "telegraf"#💥 password = "metricsmetricsmetricsmetrics"#💥
Create DB
1
CREATE DATABASE mydb
Drop DB
1
DROP DATABASE
Permission Management
Admin user management
1 2 3 4
CREATE USER GRANT ALL PRIVILEGES REVOKE ALL PRIVILEGES SHOW USERS
Non-admin user management:
1 2 3 4
CREATE USER GRANT [READ,WRITE,ALL] REVOKE [READ,WRITE,ALL] SHOW GRANTS
Case
1 2 3 4 5
# create admin user CREATE USER <username> WITH PASSWORD '<password>' WITH ALL PRIVILEGES
# create normal user CREATE USER <username> WITH PASSWORD '<password>'
1 2
# add database permission to user GRANT [READ,WRITE,ALL] ON <database_name> TO <username>
近期评论