Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change neo4j database password

Tags:

neo4j

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?

like image 759
Masoud Andalibi Avatar asked Jan 29 '17 10:01

Masoud Andalibi


People also ask

How do I reset my neo4j UserName and password?

You can use neo4j-admin set-initial-password to reset the password.

What is the default password neo4j?

The default password for a neo4j database is neo4j. The password for the example database is BloodHound. Click “Login”, and the GUI will attempt to authenticate to neo4j with the information you provided. You can optionally click “Save Password” to automatically log in next time with the same info.

How do I change the default database in neo4j?

You can change the default database by using dbms. default_database , and restarting the server. In Community Edition, the default database is the only database available, other than the system database.


2 Answers

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)

like image 199
Luanne Avatar answered Sep 28 '22 01:09

Luanne


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.

like image 20
Максим Бондаренко Avatar answered Sep 28 '22 02:09

Максим Бондаренко