Influxdb: Difference between revisions
Jump to navigation
Jump to search
Line 28: | Line 28: | ||
</pre> | </pre> | ||
== Use Database == | |||
=== Connect === | === Connect === | ||
* Authentification | * Authentification | ||
Line 39: | Line 40: | ||
<syntaxhighlight lang="mysql"> | <syntaxhighlight lang="mysql"> | ||
CREATE DATABASE database_name | CREATE DATABASE database_name | ||
CREATE RETENTION POLICY "two_days" ON "myDatabase" DURATION 2d REPLICATION 1 | |||
SHOW DATABASES | SHOW DATABASES | ||
</syntaxhighlight> | |||
=== Create user === | |||
<syntaxhighlight lang="mysql"> | |||
CREATE USER myAdmin WITH PASSWORD 'myPassword' | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 06:07, 16 October 2020
Influx
Initial Setup
Force listen on local IP
[http] bind-address = ."192.168.1.10"
Connect to a specific host
influx -host myInfluxHost
Create Admin User
influx
CREATE USER myAdmin WITH PASSWORD 'myPassword' WITH ALL PRIVILEGES
Enable Login
[http] auth-enabled = true
Use Database
Connect
- Authentification
auth
username:
password:
Create Database
CREATE DATABASE database_name
CREATE RETENTION POLICY "two_days" ON "myDatabase" DURATION 2d REPLICATION 1
SHOW DATABASES
Create user
CREATE USER myAdmin WITH PASSWORD 'myPassword'
Grant user to Database
- Use Database
use myDatabase