Erin Li
Erin Li

Reputation: 205

"The client is unauthorized due to authentication failure"

I just started to learn Neo4j.However, I come across a problem when connecting to Neo4j at the very beginning. As the image shown, it says "The client is unauthorized due to authentication failure." Any solutions?

My browser shows this

Upvotes: 16

Views: 27692

Answers (3)

petre
petre

Reputation: 508

I had the same error. After trying many things, I solved it by creating a new user with admin and PUBLIC roles from browser. Then used this username and password in my application:

spring.neo4j.uri=bolt://localhost:7687
spring.neo4j.authentication.username=myuser
spring.neo4j.authentication.password=mypass

I attach the images:

enter image description here

--- then ---

enter image description here

--- then ---

enter image description here

Upvotes: 0

Peter
Peter

Reputation: 159

For the command line, there is same situation. Give username and pass as argument. Like:

-u neo4j -p neo4j

Upvotes: 6

Michael Halim
Michael Halim

Reputation: 718

Since the accepted answer made no sense to me, here's my answer. Im using Neo4J Community Server 4.4.8 and when you download it, you get a folder that looks something like this

Neo4J Community Server Folder

Look into the Neo4J Community Server Folder/data and the folder looks like this and DELETE the inside of databases and transactions data folder

DELETE this in data/databases data/databases

DELETE this in data/transactions enter image description here

NOTES

  1. After you delete this the file in your databases will gone
  2. This is works if you're working in localhost
  3. After you delete all that, the neo4j in localhost:7474 will be reset with USERNAME = neo4j and PASSWORD = neo4j

Upvotes: 3

Related Questions