In Linux, starting and stopping Neo4J database are quite easy, as described in here. To start server you can execute this command :
to stop server :
After start the server, we can operate a database located in
$NEO_INSTALLATION/data/graph.db. Unfortunately, there is no command, something like ‘CREATE DATABASE’ in MySQL. In this post, I try to share my experience in creating new database in neo4j. Neo4j saves its configuration in
$NEO_INSTALLATION/conf. There are several configuration files such as neo4j.properties and neo4j-server.properties. Neo4j.properties is intended to save database ‘tuning’ configuration and neo4j-server.properties is for operational settings when neo4j server is run. And that’s it, neo4j-server.properties is what we will use to create a new database.
To create a new database, try these following steps :
- stop neo4j server (if it is on).
- open the neo4j-server.properties, using your favourite text editor.
- find the ‘key’, named org.neo4j.server.database.location. Edit the value to your ‘wannabe’ new database location. For example if your new database will be located in $NEO_INSTALLATION/data-test/graph-test.db, you should set the value to
org.neo4j.server.database.location=data-test/graph-test.db. It is relative path to neo4j installation directory, and of course you can use absolute path. ( Note : at this step, only the directory data-test exist. The graph-test.db is not exist yet ).
- start neo4j server, wait for a second, and you will get your new neo4j database.
You can now play with your new database. 🙂