ERR: unable to parse authentication credentials

Hi,

I tried to install influxDB using Digital Ocean.
I started influx CLI using:

influx

following lines appeared:

Connected to http://localhost:8086 version 1.7.2
InfluxDB shell version: 1.7.2
Enter an InfluxQL query

Then I wanted to create a database using following command:

CREATE DATABASE myDB

But I got this error:

ERR: unable to parse authentication credentials
Warning: It is possible this error is due to not setting a database.
Please set a database with the command “use <database>”.

I search on internet what was going on. All was about being logged with permission (correct me if i’m wrong)

I found this interesting post Authentication doesn't work in 0.11 · Issue #5792 · influxdata/influxdb · GitHub where someone managed to solve the error.

influx -username admin -password test

but… I never created any user for influx. I tried

create user admin with password ‘test’ with all privileges

Error again :frowning:

Since the post is closed, I have to create a new one.

I’m stuck and i don’t know if I have to contact Digital Ocean support or someone here can help me.

Thanks for reading,
Baptiste

Hi,

Did yo try wrapping the username in double quotes?

create user "admin" with password ‘test’ with all privileges

I’ve just tried your version and i think the single quotes could be a problem also. ‘test’ the single quotes look formatted, you should try 'password'

So,

create user "admin" with password 'test' with all privileges

That should definitely work, if you don’t get any error message then you can check with show users to confirm if the account was created.

Hi , what is the outcome of

 influxd config|grep -i auth

auth-enabled should be false …

Thank you for your reply :slight_smile:

Whatever I type, it always end up
_ ERR: unable to parse authentication credentials
Warning: It is possible this error is due to not setting a database.
Please set a database with the command “use <database>”._

I tried create user "admin" with password 'test' with all privileges using any possible quote.

I will try to contact Digital Ocean Support to see what they can do :frowning:

Have a good day,
Baptiste

P.S. Digital Ocean console is so amazing I can’t type | in (letters work fine but anythings that is not a number or a letter is either missing or in the wrong place). Sadly, I have to way to execute influxd config|grep -i auth

BTW : show users return me a user. His name is ERR: unable to parse authentication credentials
Warning: It is possible this error is due to not setting a database.
Please set a database with the command “use <database>”. :smile:

Hello, I made some changes that worked.

First :male_detective:

auth-enabled = true

The default realm sent back when issuing a basic auth challenge.

realm = “InfluxDB”

Determines whether HTTP request logging is enabled.

log-enabled = true

[monitor]

Whether to record statistics internally.

store-enabled = true

The destination database for recorded statistics

store-database = “_internal”

The interval at which to record statistics

store-interval = “20s”

Restart service of influxdb : systemctl restart influxdb

localman@app: ~ # influx
Connected to http://localhost:8086 version 1.7.8
InfluxDB shell version: 1.7.8

CREATE USER “adm” WITH PASSWORD ‘administrator’ WITH ALL PRIVILEGES
exit
Restart service of influxdb

now reconnect with this user and password

auth adm administrator
show users
user admin


adm true

show databases
name: databases
name


_internal

Best regards :wink: