Basic Command
Connect
1 | influx -precision rfc3339 |
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 | CREATE USER |
Non-admin user management:
1 | CREATE USER |
Case
1 | # create admin user |
1 | # add database permission to user |
1 | REVOKE ALL PRIVILEGES FROM <username> |
1 | SET PASSWORD FOR <username> = '<password>' |
1 | DROP USER <username> |
Measurement
1 | SHOW MEASUREMENTS |