Posts

Showing posts with the label Control

New blank Neo4j Database

Recipe for creating new ‘blank’ database. Putty onto the server  cd /etc/neo4j sudo vi neo4j.template Uncomment and edit and change one line – the name of the database #***************************************************************** # Neo4j Community configuration # # For more details and a complete list of settings, please see # https://neo4j.com/docs/operations-manual/current/reference/configuration-settings/ #***************************************************************** # The name of the database to mount dbms.active_database=prod.db cypher.forbid_shortestpath_common_nodes=false # Paths of directories in the installation. dbms.directories.data=/var/lib/neo4j/data restart the machine / service. When you now check the dbms.directories.data directory there is another directory alongside the default graph.db The browser now shows an empty database with no nodes, relationships or properties.

Stopping and Starting the Neo4j Database

Controlling the service System services are controlled with the systemctl command. It accepts a number of commands and follows the format: systemctl {start|stop|restart} neo4j you may find that you need to prefix the systemctl command with sudo like: sudo systemctl stop neo4j looking at the output of the status command we get :   sudo systemctl status neo4j ● neo4j.service - Neo4j Graph Database    Loaded: loaded (/etc/systemd/system/neo4j.service; enabled; vendor preset: enabled)    Active: active (running) since Thu 2020-07-23 09:53:29 UTC; 1h 33min ago  Main PID: 958 (pre-neo4j.sh)     Tasks: 64    Memory: 14.3G       CPU: 22min 1.740s    CGroup: /system.slice/neo4j.service            ├─ 958 /bin/bash /etc/neo4j/pre-neo4j.sh            ├─ 996 /bin/sh /etc/neo4j/reset-password-aws.sh            ├─ 997 /usr/bin/java -cp /va...