1

According to this answer, one could use rm -rf data/databases/graph.db to reset database. However, after I ran this command in the folder C:\Users\user_name\Documents\Neo4j\default.graphdb, while the folder databases is gone, when I run the java program, the nodes are still there; when I run neo4j via browser after restarting the server, the nodes are also there.

I loaded the data from csv files into neo4j with java driver. This is the maven dependency for the driver:

    <dependency>
        <groupId>org.neo4j.driver</groupId>
        <artifactId>neo4j-java-driver</artifactId>
        <version>1.1.2</version>
    </dependency>

How should I reset the database?

Community
  • 1
  • 1
Aqqqq
  • 816
  • 2
  • 10
  • 27

1 Answers1

2

You might have a situation similar to the root cause of the issue in this other question.

There is a poorly documented difference between installing neo4j using an installer (which is most common) versus from a zip or tar file.

(A) When you install neo4j using an installer, the installer configures the neo4j server to look for the database folder in a path like the one you deleted.

(B) When you install neo4j from a zip or tar file, the neo4j server will look for the the database folder folder in the neo4j installation folder (e.g., C:\path_to_neo4j_installation\data\databases\graph.db).

Does (B) apply to you?

Community
  • 1
  • 1
cybersam
  • 63,203
  • 6
  • 53
  • 76
  • I uninstalled neo4j and re-installed it with zip. The command of `rm -rf ...` works for me now. – Aqqqq Apr 19 '17 at 21:14