Hi,
I can’t to create the users or database in influx in Ubuntu 16.04.4 LTS (GNU/Linux 4.4.0-127-generic x86_64)
I get this message ERROR.
root@srv-seel:~# influx
Connected to http://localhost:8086 version 1.5.2
InfluxDB shell version: 1.5.2
> SHOW USERS
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 ”.
> CREATE DATABASE demo
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 ”.
Thank you for yor help !
Hi, in terminal
influx -username <your influxDB user name> -password "yourinfluxpassword"
If you are using a self signed cert add the ssl flag as follows:
influx -username <your influxDB user name> -password "yourinfluxpassword" -ssl -unsafeSsl
You should then be authenticated and able to run the commands you want. If you havent created an influxdb user name on your instance
then in terminal:
1) influx
then
2) CREATE USER "your_user" WITH PASSWORD 'password' WITH ALL PRIVILEGES
Then log in with the new user
EDIT:
I realised after reading that article again, i negelected to mention enabling http in the influxdb config file:
sudo nano /etc/influxdb/influxdb.conf
look for the [http] section and enable authorisation. save and restart influx you should be good to go.
Very strange, I’ve literally just set up a new instance.
I think i might have figured it out though. I just tried to create a second user using the commands above and it wouldn’t work. Apparently after enabling http authentication in influx DB you must provide credentials (which makes sense).
Could you edit your influx config and comment out the line for http auth enabled (5th red line down in the first screen shot) and restart influxdb.
Then, type influx
and try to run the command again. If it fails with the username emcfrance, try creating a second user and see if it works.
I want to work out if the first account your created has indeed been created in influxdb, it could exist with only normal privileges.