Light
Dark
System
1.0latest

Administering an instance

Create a database:

Copy
db> 
create database my_new_project;
OK: CREATE DATABASE

Create a role:

Copy
db> 
create superuser role project;
OK: CREATE ROLE

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

Copy
db> 
... 
... 
... 
... 
... 
... 
... 
configure instance 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),
};
OK: CONFIGURE INSTANCE

Set a password for a role:

Copy
db> 
... 
alter role project
    set password := 'super-password';
OK: ALTER ROLE

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

Copy
db> 
... 
... 
... 
... 
configure instance insert Auth {
    comment := 'password is required',
    priority := 0,
    method := (insert SCRAM),
};
OK: CONFIGURE INSTANCE

Remove a specific authentication method:

Copy
db> 
... 
configure instance reset Auth
filter .comment = 'password is required';
OK: CONFIGURE INSTANCE

Run a script from command line:

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