Oh yeah, try specifying the hostname as localhost (I think it’s -h, but --help will confirm it). Psql tries by default to connect to that socket, but in docker it does use it.
Basically, you’ll need to specify the hostname and user (and if port, which should just be default, then -p 5432)
It should be
docker exec -it lemmymydomain_postgres_1 psql -h localhost -U lemmy (dbname)
Keeping in mind that you’ll need to have the right user and database name, assuming (based on your original comment) lemmy
being the username and the db name might also be lemmy
Edit: this should btw just get you into the db, I have no idea of its a good idea or not to delete a user directly from the db, it might cause issues, but I don’t have experience with it, but just generally use postgres in docker with other projects
Glad you solved it! Definitely sounds like a better solution than playing around in the db