Connecting to local database via Python Bolt

Hello,

I am new to Neo4J - and I'm struggling to connect to the sandbox via python.
I've tried the following code:
uri="bolt://localhost:7687"
driver = GraphDatabase.driver(uri, auth=("neo4j", "my_password"))

but get the following error:
neobolt.exceptions.AuthError: The client is unauthorized due to authentication failure.
Failed to write data to connection Address(host='localhost', port=7687) (Address(host='127.0.0.1', port=7687)); ("0; 'Underlying socket connection gone (_ssl.c:1997)'")

Any ideas?

Many thanks.
Guy

Hi,

Could you clarify what you mean when you say you're trying to connect to the sandbox? Do you mean a Neo4j Sandbox from Neo4j Sandbox | Online Graph Database – No Download Required?

If so then I think your uri is incorrect - the sandbox should tell you the value to use for that:

e.g. the URI for my database here would be:

54.162.226.29:37080

If you're trying to connect to a local Neo4j database then I'm not sure what the problem could be other than that the password is incorrect.

Thanks Mark,
I’m trying to connect to local desktop version but also tried the neo4jsandbox.

For each instances it looks like the user is neo4j but I have no record of the password associated with that user. I’ve tried neo4j as the password and that doesn’t work either.

There also doesn’t seem to be a way to reset the password without knowing the current one...so I’m a bit stuck...

If you're using Neo4j Desktop you can reset the password via the Administration tab:

Selection_902