We did this:
"sudo su - postgres
psql
CREATE USER mastodon CREATEDB;
\q
"
But there's no password?
sudo -u postgres psql -c "UPDATE USER mastodon WITH password 'the-password-you-want';"
@asonix We found that, but we can't seem to log into postgres as mastodon?
Like it just ends up being postgres@spiderrobotpig@computername with an unknown password
Bleh we are bad at this.
But now we gotta do it tbh
log in how? with psql?
@asonix We dunno.
Like, once we make the mastodon user, it just does it, then leaves us with the user postgres@spiderrobotpig@{computername} and it's borked
@asonix It said peer authentication failed when we tried that
@asonix Now it says the database doesn't exist.
Gonna go cry in a corner for a bit now haha
The database was never created. the "mastodon" user was created with permissions to create a database.
If you're using "-d mastodon" in your command, it will not work until you first create a database with the mastodon user as the owner.
@asonix we did CREATE USER mastodon CREATE DATABASE;
\q
Was that wrong?
@asonix CREATEDB**
That creates the mastodon user with CREATEDB permissions, but does not create a database
sudo -u postgres psql
CREATE DATABASE mastodon WITH OWNER mastodon;
\q
@asonix YAAAAAAAAAAAAAAAAAY
THANK YOU >^<
@spiderrobotpig
from http://stackoverflow.com/questions/17443379/psql-fatal-peer-authentication-failed-for-user-dev
sudo -u postgres psql -U mastodon -h 127.0.0.1