Search code examples
memgraphdb

How can I check user privileges in Memgraph?


I've checked the documentation for managing user privileges (https://memgraph.com/docs/memgraph/how-to-guides/manage-user-privileges) and I've created a new user:

CREATE USER `james@skyfalllodge.co.uk` IDENTIFIED BY '007'; 

And I've added the privileges:

GRANT MATCH, MERGE, CREATE, DELETE, REMOVE, SET TO `james@skyfalllodge.co.uk`

How can I check if the privileges are assign? Do I need to try to run queries using MATCH, MERGE, CREATE, DELETE, REMOVE to test it out?


Solution

  • The query that you are looking for is

    SHOW PRIVILEGES FOR `james@skyfalllodge.co.uk`
    

    P.S. The query that you have listed (GRANT MATCH, MERGE, CREATE, DELETE, REMOVE SET TO james@skyfalllodge.co.uk) has a typo. You are missing a comma after remove. Please fix this.