Search code examples
memgraphdb

How can I pass flags and parameters to mgconsole when I use Memgraph Platform?


When I use mgconsole on my OS (Linux, Unbutnu 22) I run it with mgconsole --host 127.0.0.1 --port 7687 --username ttinker --password riegd8cb57.

Now I'm trying out Memgrpah Platform docker image. When I start it using run -it -p 7687:7687 -p 7444:7444 -p 3000:3000 memgraph/memgraph-platform I can see the mgconsole already up, but I can't pass username and password to it. Can I somehow pass that info to Memgraph Platform?


Solution

  • If you are using Memgraph Platform you need to pass flags to mgconsole when you are starting your Docker. Your command should be:

    docker run -it -p 7687:7687 -p 7444:7444 -p 3000:3000 -e MGCONSOLE="--username ttinker --password riegd8cb57" memgraph/memgraph-platform