Skip to content

Instantly share code, notes, and snippets.

@tsolar
Last active September 13, 2020 17:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsolar/9d93d2e20304c9c7e52b59ca7ffa200a to your computer and use it in GitHub Desktop.
Save tsolar/9d93d2e20304c9c7e52b59ca7ffa200a to your computer and use it in GitHub Desktop.
postgresql create database
su - postgres
psql
CREATE ROLE rolename WITH LOGIN PASSWORD 'password';
CREATE DATABASE databasename OWNER rolename;
# working 2020-09-13
sudo -u postgres -i
psql
CREATE ROLE tom WITH LOGIN PASSWORD 'password';
ALTER ROLE tom WITH SUPERUSER;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment