Influxdb: Difference between revisions
Jump to navigation
Jump to search
Line 44: | Line 44: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Create user === | === Manage Users === | ||
==== Create user ==== | |||
<syntaxhighlight lang="mysql"> | <syntaxhighlight lang="mysql"> | ||
CREATE USER myAdmin WITH PASSWORD 'myPassword' | CREATE USER myAdmin WITH PASSWORD 'myPassword' | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Show users === | ==== Change Passsword ==== | ||
<syntaxhighlight lang="mysql"> | |||
SET PASSWORD FOR myUser= 'myPassword' | |||
</syntaxhighlight> | |||
==== Show users ==== | |||
<syntaxhighlight lang="mysql"> | <syntaxhighlight lang="mysql"> | ||
SHOW USERS | SHOW USERS | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Grant user to Database === | === Manage Acces Rights === | ||
==== Grant user to Database ==== | |||
<syntaxhighlight lang="mysql"> | <syntaxhighlight lang="mysql"> | ||
GRANT All ON "myDatabase" TO "myUser" | GRANT All ON "myDatabase" TO "myUser" |
Revision as of 21:31, 19 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 Authenticatification
[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
Manage Users
Create user
CREATE USER myAdmin WITH PASSWORD 'myPassword'
Change Passsword
SET PASSWORD FOR myUser= 'myPassword'
Show users
SHOW USERS
Manage Acces Rights
Grant user to Database
GRANT All ON "myDatabase" TO "myUser"
- Use Database
use myDatabase