neo4j: How do I change the database storage location?

后端 未结 4 436
迷失自我
迷失自我 2020-12-08 09:25

Hi I created a neo4j database with custom java application and tried to change path in configuration file in order to connect to created database.

While trying to ch

相关标签:
4条回答
  • 2020-12-08 09:56

    You need to set the location on disk of the database directory like this:

    org.neo4j.server.database.location=data/graph.db
    

    See http://docs.neo4j.org/chunked/stable/server-configuration.html

    0 讨论(0)
  • 2020-12-08 09:59

    You first need confirm that the database you are connecting to was properly shut down (means you should not take the image of a running database).

    Set the location of the database if you are in server mode from the file

    conf/neo4j-server.properties
    

    by editing the below line.

    org.neo4j.server.database.location=data/graph.db
    

    if you are using embedded neo4j you can set the location of your db while instantaniating the GraphDatabaseService as under:

    new EmbeddedGraphDatabase("Path To Db Directory");
    
    0 讨论(0)
  • 2020-12-08 10:00

    I had done this by editing line

    # dbms.active_database=graph.db
    

    to

    dbms.active_database=new.db
    

    in file conf/neo4j.conf

    0 讨论(0)
  • 2020-12-08 10:14

    For anyone else struggling to find this file - on my Ubuntu I found it under /etc/neo4j/neo4j.conf

    0 讨论(0)
提交回复
热议问题