2
votes

I am experimenting with several Neo4j databases in my machine. The databases have been generated and populated from Java programs. Now I would like to inspect them.

It seems that the recommended way is to open the web console so it points to a specific database by means of configuring the property:

org.neo4j.server.database.location=<database location path>

in the neo4j configuration file: conf/neo4j-server.properties

This if fine if I am only interested in one database. But it does not look like a good idea if I am switching often between databases or if I want to explore more than one at the same time. Is it possible to configure distinct web consoles (maybe using distinct ports) so they refer to my distinct databases?

And is it possible to do this without installing several instances (binaries) of Neo4j in my machine and having to modify lots of configuration files?

2

2 Answers

0
votes

Yes! If you edit that same conf/neo4j-server.properties file you can change the org.neo4j.server.webserver.port and org.neo4j.server.webserver.https.port values (I normally set the https port to one less than the http port).

Once you've done that you run ./bin/neo4j start (make sure you shut down your Java app which is accessing the database first) to start the server on that port and then simply visit http://localhost:<port>

I'm not 100% sure if generating the database from Java will generate everything that you need for running a server. If not you can download Neo4j from http://neo4j.com/download/, make multiple copies of it, and replace the graph.db folder with yours one (make sure you shut down any processes which are accessing those databases before copying the directory). Also if you've downloaded a newer version you might need to set allow_store_upgrade=true (see: http://neo4j.com/docs/stable/deployment-upgrading.html)

0
votes

You can have multiple Embedded Neo4j databases without installing separate binaries. You just need to be configure the different database path for each instance of the database.