This article outlines the basic steps necessary to query a running Memgraph database instance from Memgraph Lab.
Before you proceed with the guide, make sure that you have:
- Installed the latest version of Memgraph Lab which you can get from the official download page.
- A running Memgraph database instance. Instructions on how to do setup Memgraph can be found here.
Make sure that Memgraph is running and open Memgraph Lab. If you are starting with a fresh database instance, you don't have to change any of the options.
- Leave the
Hostfield can be either
Portfield should be
7687. Every Memgraph instance is listening on this port by default.
Encryptedoption should be disabled by default.
If you fail to connect, make sure that your database instance is up and running.
Host address is wrong, take a look at the Docker note in the installation guide.
Now, you can execute Cypher queries on Memgraph. Open the Query tab, located in the left sidebar, copy the following query and press the Run query button:
The query above will create 2 nodes in the database, one labeled "User" with name "Alice" and the other labeled "Software" with name "Memgraph". It will also create a relationship that "Alice" likes "Memgraph".
To find created nodes and relationships, execute the following query:
To learn more about the Cypher language, visit the Cypher manual or Memgraph Playground for interactive guides. For real-world examples of how to use Memgraph, we strongly suggest going through one of the available Tutorials. Details on what can be stored in Memgraph can be found in the article about Data storage.
Visit the Getting help page in case you run into any kind of problem or you have additional questions.