MacOS PostgreSQL安装后createdb报错 password authentication failed for user "用户名"
在安装PostgreSQL后,createdb命令报错 password authentication failed for user "用户名"。
经过查证,可能是因为不存在用户导致的。
可以运行命令:
sudo su postgres -c 'createuser -P --superuser username'
具体按照提示操作即可。
参考:https://stackoverflow.com/questions/20692100/createdb-could-not-connect-to-database-template1-fatal-password-authenticatio

浙公网安备 33010602011771号