Postgres用户创建数据库 [英] Postgres user create database

查看:93
本文介绍了Postgres用户创建数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法以我登录的用户身份使用postgres客户端创建数据库。

I am unable to create databases using my postgres client with the user I log in as.

我在弄清楚如何增加用户特权时遇到了麻烦。我可以访问运行postgres的linux服务器,并能够使用psql以我的用户身份和postgres用户身份登录。

I am having trouble figuring out how increase the privileges of my user. I have access to the linux server running postgres and am able to use psql to log on as my user and as the postgres user.

有人可以告诉我应该使用什么命令吗?运行以允许用户通过运行在远程主机上的postgres GUI在服务器上创建数据库?

Can someone tell me what commands I should run to allow my user to create databases on my server through the postgres GUI running on a remote host?

非常感谢,

推荐答案

我不知道postgres GUI,但是以下是在psql控制台(以超级用户身份登录)中进行操作的方法:

I don´t know of a postgres GUI, but here's how to do it in the psql-console (logged in as the superuser):

=> ALTER USER your_username CREATEDB;

请参见http://www.postgresql.org/docs/current/interactive/sql-alteruser.html 了解更多信息。

这篇关于Postgres用户创建数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆