Une Goupelin Autiste utilise witches.town. Vous pouvez læ suivre et interagir si vous possédez un compte quelque part dans le "fediverse".

We did this:

"sudo su - postgres
psql
CREATE USER mastodon CREATEDB;
\q
"

But there's no password?

@spiderrobotpig

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

Une Goupelin Autiste @spiderrobotpig

@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

@spiderrobotpig

creating the user doesn't automatically log you in as that user.

if you want to log into postgres as the mastodon user with psql, you would do

sudo -u postgres psql -U mastodon

@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

@spiderrobotpig

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?

@spiderrobotpig

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