in reply to Re: Database access and async web framework (like Mojolicious)
in thread Database access and async web framework (like Mojolicious)

thanks, I am now giving postgres a try. It's a rough ride. Still looking how to login as admin, nobody asked me to set any admin password. Once I get in there I have to disable the initdb: warning: enabling "trust" authentication for local connections. I am now trying to find that dreaded config file. And disable ports, enabling only local socket access. Oh yes rant off. But still interested to see how it is going to be after this initial hiccups.

Replies are listed 'Best First'.
Re^3: Database access and async web framework (like Mojolicious)
by hippo (Archbishop) on Dec 18, 2024 at 09:52 UTC
    Still looking how to login as admin

    The postgres O/S user should be able to do that locally without a pw (initially at least). From there you can start assigning roles and auth as you please.


    🦛

      ok, thanks, i am doing that. su is my friend.

        bummer, I need to double quote all my existing db-ops scripts to account for the extra 'su -c ...' and just now I found that 'create database' does not support 'IF NOT EXIST' and that I have to go in a huge roundabout involving some creature called \gexec which after an hour I found out it is not supported in 'psql -c ...'. Hey I think I have found in PG a new sadomasochistic group. Whips! yummy not.

        Edit: psql -Upostgres will run the commands via the 'postgres' linux user. I thought it runs the SQL commands via a db user. OK now I can avoid the constant su but I have to enter password all the time! So better running the script via su -c db-init-script.sh - postgres.