Createuser: could not connect to database postgres: FATAL: role “tom” does not exist

后端 未结 9 1237
醉话见心
醉话见心 2020-12-04 06:16

I\'m trying to set up Postgres for the first time, and I need to create a user with permissions to read and create databases. However, when I use:

createuser          


        
9条回答
  •  囚心锁ツ
    2020-12-04 06:19

    sudo -u postgres createuser -s tom 
    

    this should help you as this will happen if the administrator has not created a PostgreSQL user account for you. It could also be that you were assigned a PostgreSQL user name that is different from your operating system user name, in that case you need to use the -U switch.

提交回复
热议问题