CLI

Create a database instance my_instance:

Copy
$ 
edgedb server init my_instance

Create a database:

Copy
$ 
edgedb -I my_instance create-database my_new_project
OK: CREATE

Create a new role (other than default edgedb):

Copy
$ 
edgedb -I my_instance create-superuser-role project
OK: CREATE

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

Copy
$ 
> 
> 
> 
edgedb -I my_instance configure insert Auth \
--comment 'passwordless access' \
--priority 1 \
--method Trust
OK: CONFIGURE SYSTEM

Set a password for a role:

Copy
$ 
edgedb -I my_instance alter-role project --password
New password for 'project':
Confirm password for 'project':
OK: ALTER

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

Copy
$ 
> 
> 
> 
edgedb -I my_instance configure insert Auth \
--comment 'password is required' \
--priority 0 \
--method SCRAM
OK: CONFIGURE SYSTEM

Connect to the database:

Copy
$ 
edgedb --user project --password -d my_new_project
Password for 'project':
EdgeDB 1.0-alpha.5+g83a2a4fac.d20200826
Type "\?" for help.
my_new_project>
Light
Dark
System