ERR: unable to parse authentication credentials


#1

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 https://github.com/influxdata/influxdb/issues/5792 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


#2

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.


#3

Hi , what is the outcome of

 influxd config|grep -i auth

auth-enabled should be false …


#4

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: