PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0
Showing posts with label graph-databases. Show all posts
Showing posts with label graph-databases. Show all posts

Tuesday, October 18, 2022

[FIXED] How to run Memgraph using the same Memgraph platform Docker image but with volume?

 October 18, 2022     docker, graph-databases, memgraphdb     No comments   

Issue

Is there any info on how to run Memgraph using the same Memgraph platform Docker image, but with a volume so that the data persists between restarts?


Solution

You should try running:

docker run -it -p 7687:7687 -p 3000:3000 \
-v mg_lib:/var/lib/memgraph \
-v mg_log:/var/log/memgraph \
-v mg_etc:/etc/memgraph \
memgraph/memgraph-platform


Answered By - MPesi
Answer Checked By - David Goodson (PHPFixing Volunteer)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg

[FIXED] How to view log files while using Memgraph with Docker?

 October 18, 2022     docker, graph-databases, memgraphdb     No comments   

Issue

I am using Memgraph with Docker and I want to access today's log files. What is the easiest way to do that?


Solution

To view the log files you first need to enter the Docker container where Memgraph is running. Then follow these steps:

  1. Execute the command docker ps to find the ID of the container, CONTAINER_ID.
  2. Then, execute the command docker exec -it CONTAINER_ID bash
  3. Now you can use the command cat /var/log/memgraph/memgraph_2022-03-03.log

to check today's log file.



Answered By - MPesi
Answer Checked By - Pedro (PHPFixing Volunteer)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg

Tuesday, June 28, 2022

[FIXED] How to create relationships in according to date order in Neo4j

 June 28, 2022     graph, graph-databases, neo4j, relationship     No comments   

Issue

I have many nodes and zero relationships. How can I create relationships that join the same person following date order? (the picture represents the situation I would like to obtain) See Image


Solution

If you have apoc, this is would be my approach.

MATCH (p:Person)
WITH p order by p.date
WITH p.name as personName, collect(p) as personList
WITH apoc.coll.pairsMin(personList) as pairs
UNWIND pairs as pair
WITH pair[0] as p0, pair[1] as p1
MERGE (p0)-[:SAME_PERSON]->(p1)


Answered By - Nathan Smith
Answer Checked By - Mildred Charles (PHPFixing Admin)
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Older Posts Home
View mobile version

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
All Comments
Atom
All Comments

Copyright © PHPFixing