Tags

root@27a0239d18d7:/# psql -U postgres
postgres=# CREATE USER johndoe WITH PASSWORD ‘123456’;
postgres=# ALTER USER johndoe WITH SUPERUSER;
postgres=# GRANT ALL PRIVILEGES ON DATABASE “yourDatabaseName” to johndoe;
Make sure that you assign the user to SUPERUSER else you will encounter an error that says PG::InsufficientPrivilege: ERROR: permission denied for relation schema_migrations…

Advertisements