Skip to content

Instantly share code, notes, and snippets.

@winggundamth
Created January 6, 2017 14:12
Show Gist options
  • Save winggundamth/f836e113522a9710b54c88de985c83bc to your computer and use it in GitHub Desktop.
Save winggundamth/f836e113522a9710b54c88de985c83bc to your computer and use it in GitHub Desktop.
Create InfluxDB database and non-admin user then grant all permission to that user
CREATE USER "username" WITH PASSWORD 'password'
CREATE DATABASE "database"
GRANT ALL ON "username" TO "database"
@Patrick-Shih
Copy link

Your grant syntax is wrong. It should be

GRANT [READ,WRITE,ALL] ON <database_name> TO

@allamiro
Copy link

I think this should be

GRANT ALL ON "database" TO "username"

@Owned67
Copy link

Owned67 commented Dec 5, 2023

`> use server
Using database server

CREATE USER "Owned67" WITH PASSWORD '123456'
GRANT ALL ON "Owned67" to server`
ERR: user not found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment