Masoud Andalibi
Masoud Andalibi

Reputation: 3228

How to change neo4j database password

I am trying to change my default user password to database. I've tried this:

$ curl -H "Content-Type: application/json" \
    -X POST \
    -d '{"password":"password"}' \
    -u neo4j:neo4j \
    http://localhost:7474/user/neo4j/password"

but it doesn't let me and gave me this error:

Invalid input 'u': expected 'r/R' or 'a/A' (line 1, column 2 (offset: 1)) "curl -H "Content-Type: application/json" -X POST -d '{"password":"qazWSXEDCRFV!1"}' -u neo4j:neo4j http://localhost:7474/user/neo4j/password"" ^

How to fix this issue?

Upvotes: 7

Views: 8351

Answers (2)

If you use GUI, execute :server change-password. It will call changing password dialog where you have to type your current pass and a new one.

Upvotes: 7

Luanne
Luanne

Reputation: 19373

curl -H "Content-Type: application/json" -XPOST -d '{"password":"new password"}' -u neo4j:neo4j http://localhost:7474/user/neo4j/password

just worked for me (Neo4j 3.0.x)

Upvotes: 18

Related Questions