Neo4J

Submitted by code_admin on Fri, 11/15/2019 - 15:39

Server setup

Run container with new data volume
Shell into the container

Set initial password

  1. neo4j-admin set-initial-password <password>

(Only works if run before db is started so won't work in docker container)

Shell

  1. cypher-shell

User = neo4j, initial password is neo4j

Change password for admin:
Must be done via curl

  1. A=$(echo -n "neo4j:neo4j" | base64)
  2. curl -H "Content-Type: application/json" \
  3.     -H "Authorization: Basic ${A}" \
  4.   -d '{"password":"NEWPASS"}' \

Create user

See https://neo4j.com/docs/operations-manual/3.5/tutorial/role-based-access…
and https://neo4j.com/docs/operations-manual/3.5/authentication-authorizati…

  1. CALL dbms.security.createUser('jane', 'abracadabra', false)

false means the password will not need to be changed

Constraints

  1. CALL db.constraints
  2.  
  3. ## CREATE CONSTRAINT ON (n:lab) ASSERT exists(n.id) REQUIRES ENTERPRISE
  4. CREATE CONSTRAINT ON (n:lab) ASSERT n.id IS UNIQUE
RJM Article Type
Work Notes