Basic Use Neo4j Browser - tomgeudens/practical-neo4j GitHub Wiki
Context: The Neo4j Browser is a UI client application for the Neo4j database. This document will assume you did a Setup Neo4j Enterprise on Linux (4.3) or a Setup Neo4j Enterprise on Mac (4.3) or a Setup Neo4j Enterprise on Windows (4.3) and have the instance running.
To verify this ... you should have a shell/terminal/powershell window open where you started the database and where the final lines shown look like this (date and time will differ) ...
2021-05-31 03:16:36.913+0000 INFO Remote interface available at http://localhost:7474/
2021-05-31 03:16:36.914+0000 INFO Started.
Last Update: 2021/07/11 - update to 4.3.2
One - Fire up the webbrowser
The following recent updated (always update your webrowser) webbrowsers are acceptable
- Firefox
- Chrome
- Microsoft Edge
- Opera GX Browser
If you are still on Internet Explorer and your admin team keeps saying that's perfectly fine and secure, you have my deepest sympathies but you might want to tell them that not even Microsoft itself believes that ...
Microsoft security chief: IE is not a browser, so stop using it as your default
Just saying ... and it's also unlikely you'll be able to do a lot of what follows.
The url you have to browse to is already shown above ... but for good measure
http://localhost:7474/
and if all goes well, welcome to the Neo4j Browser application!
Two - Connecting to an instance, connecting to a database
Right away there's a lot going on there, but for now, connecting is what you want to do. Your Username is neo4j
and your Password is trinity
. Then press the (blue) Connect button.
If the connection is made, quite a few things moved. In order to get a good start, close the following panes (every pane has an X
on the top right)
- The blue Neo4j Browser Sync pane (you'll never actually use that)
- The :play start pane (we'll discuss browser guides later on)
- The :server connect pane (which just tells you you connected, well done)
This is already good practice. What you have to remember is that everything gets loaded into your webbrowsers DOM. The more panes with moving objects you have open, the more sluggish your experience will get ... it's not the database that is slow, it's your webbrowser.
By the way, closing the top (command) pane does work, but it always gets refreshed. What you should see there currently is neo4j$
, a command entry field and a blue execute arrow.
This means you are currently in the default neo4j database. Let's change that ... enter the following in the command field, then press the blue execute arrow.
:use system
Two things (should have) happened. The command pane should now show system$
and a second pane opened that has it's own command field and execute arrow. It contains your statement. This can all be a bit confusing at first so take a moment to get used to it. In the second pane, change the command to
:use neo4j
and execute. What happened?
Three - Creating and removing databases
Let's first see what we have, so switch to the system database
:use system
... and show which database we have.
SHOW DATABASES;
Create a new one
CREATE DATABASE exercise;
... and show again.
SHOW DATABASES;
Remove the exercise database
DROP DATABASE exercise;
... and show again.
SHOW DATABASES;