Skip to main content

Installing Memgraph Lab on Linux

Step 1 - Download and install Memgraph

Instructions on how to install Memgraph can be found here. After Memgraph is installed and running on your machine, you can continue with the next step.

Step 2 - Installing and setting up Memgraph Lab

1. Download Memgraph Lab by visiting the Download Hub.

2. You can install Memgraph Lab by double clicking the downloaded installer or by executing:

sudo dpkg -i MemgraphLab-x.x.x.deb

3. After you start Memgraph Lab, you should be presented with a login screen. The username and password fields are empty by default. The default connection string is set to localhost:7687. If you're using a different port, you will have to change the connection string to point to that port, i.e. localhost:<your port number>.

4. Click on connect, and you should be presented with the following dashboard:

lab-dashboard

Congratulations! You have successfully installed Memgraph Lab and connected it to Memgraph. You are now ready to start building your graph and querying it.

caution

You might receive the following error message when trying to connect.

failed_connection

In this case, make sure that Memgraph is properly up and running and that you have entered the correct port number.

Step 3 - Create a simple graph

Let's create a simple graph and execute some queries. This will make sure everything is running correctly.

Go to the Query tab, enter the following Cypher query and click Run query.

CREATE (u:User {name: "Alice"})-[:Likes]->(m:Software {name: "Memgraph"});

You just created 2 nodes in the database, one labeled User with the name "Alice" and the other labeled Software with the name "Memgraph". Between them, you also created a relationship indicating that "Alice" likes "Memgraph".

Now that the data is stored inside Memgraph, you can run a query to retrieve and visualize the graph. Execute the following query:

MATCH (u:User)-[r]->(x) RETURN u, r, x;

You should get the following result:

graph_result

Now that you know your development environment is working, you are ready to continue exploring Memgraph and building much more interesting projects leveraging connected data.

Where to next?

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.

Getting help

Visit the Getting help page in case you run into any kind of problem or you have additional questions.