I followed this tutorial and made a typo where I was supposed to create a user for my django apps to connect as;
I was supposed to run su - postgres -c "createuser www-data -P"
but I ran su - postgres -c "createuser www-dtata -P"
.
I dont want to proceed until I remove that user, which I don't know the command for. I found and tried DROP USER
after searching around, but the terminal returned -su: DROP: command not found
.
Run sudo su - postgres -c "dropuser www-dtata"
You can use dropuser
console tool (see https://www.postgresql.org/docs/current/static/app-dropuser.html):
su - postgres -c "dropuser www-dtata"
Or use DROP USER
SQL query (see https://www.postgresql.org/docs/current/static/sql-dropuser.html):
sudo -u postgres psql -c 'DROP USER "www-dtata";'
These 2 approaches do the same thing. In SQL version, you also need to use double quotes around DB user name, due to -
in it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With