Postgresql initial configuration: How to access as the postgres user?

后端 未结 2 1507
半阙折子戏
半阙折子戏 2021-01-27 10:10

After installing postgresql, I tried it out, typing createdb mydb, like it\'s written in the documentation. Then the following error occured:

createdb: could not         


        
2条回答
  •  生来不讨喜
    2021-01-27 10:23

    if the db is owned by user postgres you can do the following

    createdb -U postgres dbname

    since by default postgresql will trust connections from localhost.

提交回复
热议问题