4

I have multiple projects using Neo4j and I'd like to separate them so I don't have to clear and reseed the database whenever I switch between projects. How can I do this?

I downloaded Neo4j using brew install neo4j. I start and stop neo4j using neo4j start and neo4j stop, but I think I just read that somewhere... there is no man neo4j or neo4j --help. And the documentation is terrible so I've been shooting in the dark for a while now.

I'd like to be able to do something like this:

neo4j start --path ~/projects/social-app/db/ --ip 127.0.0.1 --port 3002

This would create the database and run it on the local ip and port. Any ideas?

P.S. where the the documentation on this?

Chet
  • 18,421
  • 15
  • 69
  • 113

1 Answers1

5

Neo4j doesn't support "schemas" or multiple databases as we know those features from more traditional databases like MySQL.

You have three options

  1. Create script, which will do following

    stop neo4j
    change path for database in [neo4j_home]/conf/neo4j-server.properties (org.neo4j.server.database.location=data/graph.db)
    start neo4j

  2. Have directory with Neo4j binaries for each project and just start instance which you need.

    • Also you can run each instance on different port (org.neo4j.server.webserver.port)
  3. Use Neo4j CLI Toolkit, but it's still in progress

MicTech
  • 42,457
  • 14
  • 62
  • 79