Authentication

ArangoDB allows to restrict access to databases to certain users. Allusers of the system database are considered administrators. Duringinstallation a default user root is created, which has access toall databases.

You should create a database for your application together with auser that has access rights to this database. SeeManaging Users.

Use the arangosh to create a new database and user.

  1. arangosh> db._createDatabase("example");
  2. arangosh> var users = require("@arangodb/users");
  3. arangosh> users.save("root@example", "password");
  4. arangosh> users.grantDatabase("root@example", "example");

You can now connect to the new database using the userroot@example.

  1. shell> arangosh --server.username "root@example" --server.database example