Skip to content

Instantly share code, notes, and snippets.

@pedropalhari
Created July 22, 2022 02:42
Show Gist options
  • Save pedropalhari/94b1409d72d3248ce3f2404d78fdcdf7 to your computer and use it in GitHub Desktop.
Save pedropalhari/94b1409d72d3248ce3f2404d78fdcdf7 to your computer and use it in GitHub Desktop.
Create PostgreSQL user - without trial and error.
- Go to the postgres user
$ sudo su postgres
- Execute create user
$ createuser --interactive <user>
- Change it's password inside postgres
$ psql
$ ALTER USER <user> WITH PASSWORD '<password>';
- Done, try connecting with prisma. Don't forget to encode the password in case of any special characters.
I do this once every 6 months and every time need to trial-and-error through multiple tutorials. :(
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment