在Postgres中创建超级用户 [英] Create a Superuser in postgres
本文介绍了在Postgres中创建超级用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在寻找使用Vagant设置Rails环境,为此,它已通过bash shell方法提供,其中包括以下行:
sudo -u postgres createuser <superuserusername> -s with password '<superuserpassword>'
createuser: too many command-line arguments (first is "with")
您能帮助我使用密码创建超级用户的正确语法吗?谢谢
推荐答案
解决方式:
sudo -u postgres createuser -s -i -d -r -l -w <<username>>
sudo -u postgres psql -c "ALTER ROLE <<username>> WITH PASSWORD '<<password>>';"
我知道这不是一个好的解决方案,但就目前而言,它可以做😊
这篇关于在Postgres中创建超级用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文