cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

"-p password" argument when executing commands from Windows cmd

I am following the backup/restore instructions listed here: Back up and restore a database in Causal Cluster - Operations Manual

I have gotten to step 6 "Recreate the database users and roles".

I type the following command in Windows cmd:

< type data\scripts\movies1\restore_metadata.cypher | bin\cypher-shell.bat -u neo4j -p password -a localhost:7687 -d system --param "database => 'movies1'" />

where I replace with my password
I'm given the following error message:
< The client is unauthorized due to authentication failure />

However, if I type both commands separately, they both work:
< type data\scripts\movies1\restore_metadata.cypher />

AND THEN

< bin\cypher-shell.bat -u neo4j -a localhost:7687 -d system --param "database => 'movies1'" />

For this last command to work, I have to remove < -p password /> from the command. If I keep it, I get the same error as above. After I type in this last command, I'm prompted to enter my password. After I enter it, I connect to Neo4j.

I suppose my real question is this:

Why can I connect to Neo4j through the command line using:
<bin/cypher-shell -u username /> after which I'm prompted for a password, but

<bin/cypher-shell -u username -p password /> gives me an error that says "The client is unauthorized due to authentication failure"?

Thanks for your suggestions.

0 REPLIES 0