在Ubuntu系统下使用PgAdmin创建用户,可以按照以下步骤进行:
sudo apt update
sudo apt install postgresql pgadmin4
sudo systemctl start postgresql
sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'your_password';"
sudo nano /etc/postgresql/12/main/pg_hba.conf
在文件末尾添加以下行:
host all all 0.0.0.0/0 md5
保存并关闭文件,然后重新启动PostgreSQL:
sudo systemctl restart postgresql
pgadmin4
在PgAdmin的左侧面板中,右键单击“Servers”并选择“Create” “Server…”。
在“General”选项卡中,输入一个名称(例如,“My PostgreSQL Server”)。
转到“Connection”选项卡,输入以下信息:
单击“Save”以保存设置并连接到PostgreSQL服务器。
通过以上步骤,您可以在Ubuntu系统下使用PgAdmin成功创建用户并分配相应权限。
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读:ubuntu pgadmin用户管理