Create superuser(root) in postgres database

I always forget the exact syntax for this so I am posting it here. It’s easy when you know how:

CREATE USER root WITH PASSWORD ‘My.g00d.Pa55word’;
ALTER USER root WITH SUPERUSER;

Also make sure that your ip is allowed in pg_hba.conf

This entry was posted in postgres. Bookmark the permalink.

Comments are closed.