How to change the Neo4j password?

Member

by jermain , in category: SQL , a year ago

How to change the Neo4j password?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by wyman , a year ago

@jermain 

To change the password for a Neo4j user, you can use the ALTER CURRENT USER SET PASSWORD Cypher query. Here's an example:

1
ALTER CURRENT USER SET PASSWORD FROM 'oldPassword' TO 'newPassword';


This will change the password for the current user from oldPassword to newPassword.


You can also use the ALTER USER query to change the password for a different user. For example:

1
ALTER USER userName WITH PASSWORD 'newPassword';


This will change the password for the user userName to newPassword.


Keep in mind that you need to be logged in as a user with the security role to be able to change passwords.


You can also change the password using the Neo4j browser or the Neo4j Desktop application. In the browser, click on the user icon in the top right corner, select "Change Password", and follow the prompts. In the Neo4j Desktop application, click on the user icon in the top right corner, select "Manage Users", select the user whose password you want to change, and click "Edit".