0
votes

I would like to finish my installation with Docker/ArangoDB, but I find somes errors in Arangosh :

  1. I install Docker CE;
  2. I use this code to simplify installation and avoid manager installation : sudo docker volume create arangodb3 sudo docker stop arangodb-instance sudo docker run -d \ -e ARANGO_NO_AUTH=1 \ -p 8529:8529 \-v arangodb3:/var/lib/arangodb3 \ --name arangodb-instance \ arangodb/arangodb:3.4.9

sudo docker exec -it arangodb-instance arangosh

3)ARANGOSH this my errors for :

Command-line history will be persisted when the shell is exited. Connected to ArangoDB 'http+tcp://127.0.0.1:8529' version: 3.4.9 [SINGLE, server], database: '_system', username: 'root'

Type 'tutorial' for a tutorial or 'help' to see common examples 127.0.0.1:8529@_system> db._createDatabase("testdb"); true

MY ERRORS : 127.0.0.1:8529@_system> users.save("testuser@localhost", "dbuserpassword"); JavaScript exception: ReferenceError: users is not defined !users.save("testuser@localhost", "dbuserpassword"); !^ stacktrace: ReferenceError: users is not defined at :1:1

127.0.0.1:8529@_system> 127.0.0.1:8529@_system> users.grantDatabase("testuser@example", "testdb"); JavaScript exception: ReferenceError: users is not defined !users.grantDatabase("testuser@example", "testdb"); !^ stacktrace: ReferenceError: users is not defined at :1:1

127.0.0.1:8529@_system>

I just to use the command-lines: db._dropDatabase("testdb"); sudo vim /etc/arangodb3/arangod.conf #endpoint = tcp://127.0.0.1:8529 endpoint = tcp://192.168.10.11:8529 sudo systemctl restart arangodb3 sudo ufw allow proto tcp from any to any port 8529

To have access in WEB dashboard of ArangoDB.

Thank you for your response.

1

1 Answers

0
votes

In order to have access to the users object, you first need to import it a la:

users = require('@arangodb/users');
users.save('JohnSmith', 'mypassword');

Source: Managing Users in the ArangoDB Shell