What Does "Warning: Not Changing User" Mean in Neo4J

What does WARNING: not changing user mean in Neo4j?

The (badly worded) warning is telling you that you are not starting neo4j as the root user. When running neo4j in production, one would normally expect the root user to start neo4j.

But during development, most people probably run neo4j on their local computer under their own user id -- and this should not be a problem.

Also, note that neo4j uses the UID environment variable to determine the current user ID. At least in my case, echo $UID and sudo echo $UID return the same value. Therefore, you will still see the warning even if you use sudo to start neo4j. However, if I use su to become the root user, echo $UID returns 0 (the root user ID), and neo4j will not display the warning.

neo4j 120 seconds error after copying graph.db permission

As commented before the data was corrupted. It was impossible to recover it.

The correct way to do the backup is: link

  • Never copy the files while running the database.

  • We need to zip the graph.db file and then copy it in another location as a backup.

  • For restore stop the database just delete recursively graph.db and unzip the backup.

Sadly the first data could not be restored...

Neo4j Cypher queries EXPLAINed identically but warnings are generated just for one

While the warning is true, the queries do build a cartesian product, that is fine in this case, as this is exactly what you want, n and t even if they aren't connected, and cardinality would be low in any case (likely 1, if these are unique nodes).

Disregard the warning and keep your first query, when you're doing something like this where the expected number of nodes of each of those variables is 1, or at least small.

As for why the warning doesn't appear in the second plan, that's likely just a limitation on what is looked at to generate the warning. These are still equivalent, and the same thing applies.

And just to note the real reason for the warning, it's to prevent you from doing something like:

MATCH (a:A), (b:B)

or similar, where you would end up with a cartesian product between all of one kind of node against all of another. When you narrow these down with specific properties (especially unique properties) that's just a 1x1 cartesian product, no issues.

how to set up permissions in neo4j?

Neo4j, running as a service, must have ownership of the folder where you placed the database (such as /var/lib/neo4j/data). Your database is elsewhere, and only you have access currently (as you, the logged-in user, created that database folder).

Try changing permissions to that entire data folder (recursively), with:

sudo chown -R neo4j:adm /home/monica/new_database_directory

If you look at the existing /var/lib/neo4j folder, the ownership should match that (neo4j:adm). After running the chown command, your new data folder should have the same ownership.

Then try starting the service again.

How can i optimize neo4j query. Neoj4 shows this warning: This query builds a cartesian product between disconnected patterns

You are building a cartesian product because of this part : (p:Post), (me:User{username: 'someUsername'})

Here you define a pattern that is disjoint : (p:Post) & (me:User{username: 'someUsername'}). So the DB have to create a cartesain product between those two distinct sets.

But I assume that you have a unique constraint on :User(username), so the cartesian is in reality 1xN, so it'sOK (Neo4j message is just a warning).

Your query is slow due to yours complex where clauses, with a lot of OR. Instead of doing this into the where clause, can you try to put it directly in the MATCH part or an OPTIONAL MATCH.

Moreover, I think that your query can be cut in multiple simple queries, and you can join them with a UNION.

Cheers



Related Topics



Leave a reply



Submit