Admin Commands

Create a database:

Copy
db> 
CREATE DATABASE my_new_project;
CREATE

Create a role:

Copy
db> 
CREATE SUPERUSER ROLE project;
CREATE

Configure passwordless access (such as to a local development database):

Copy
db> 
... 
... 
... 
... 
... 
... 
... 
CONFIGURE SYSTEM INSERT Auth {
    # Human-oriented comment helps figuring out
    # what authentication methods have been setup
    # and makes it easier to identify them.
    comment := 'passwordless access',
    priority := 1,
    method := (INSERT Trust),
};
CONFIGURE SYSTEM

Set a password for a role:

Copy
db> 
... 
ALTER ROLE project
    SET password := 'super-password';
ALTER

Configure access that checks password (with a higher priority):

Copy
db> 
... 
... 
... 
... 
CONFIGURE SYSTEM INSERT Auth {
    comment := 'password is required',
    priority := 0,
    method := (INSERT SCRAM),
};
CONFIGURE SYSTEM

Remove a specific authentication method:

Copy
db> 
... 
CONFIGURE SYSTEM RESET Auth
FILTER .comment = 'password is required';
CONFIGURE SYSTEM

Run a script from command line:

cat myscript.edgeql | edgedb [connection-option...]
Light
Dark
System