创建postgres用户_如何为Postgres或PostgreSQL服务器定义,添加,创建用户?

本文档详细介绍了如何在PostgreSQL数据库服务器上创建用户,包括通过交互式问题、指定权限以及创建无登录用户的步骤。教程涵盖了使用`sudo -u postgres`切换到Postgres用户,使用`createuser`命令的不同选项,以及如何管理用户的创建用户权限和登录能力。
摘要由CSDN通过智能技术生成
创建postgres用户

创建postgres用户

PostgreSQL Database Server have a lot of tools to manage the suite. Creating user is one of the most popular issue to manage Postgres Database. In this tutorial we will examine how to create user with different rights, privileges, database. We will mainly follow createuser tool for these and createuser is a wrapper for the CREATE ROLE Sql statement. By the way we have allready examined the PostgreSQL Database Server installation in the following tutorial.

PostgreSQL数据库服务器有很多工具来管理该套件。 创建用户是管理Postgres数据库的最受欢迎的问题之一。 在本教程中,我们将研究如何创建具有不同权限,特权和数据库的用户。 我们将主要针对这些用户使用createuser工具,而createuserCREATE ROLE Sql语句的包装器。 顺便说一下,我们已经在以下教程中检查了PostgreSQL数据库服务器的安装。

How To Install PostgreSQL Server Into Linux, Debian, Ubuntu, CentOS, Mint, Fedora, Redhat?

如何在Linux,Debian,Ubuntu,CentOS,Mint,Fedora,Redhat中安装PostgreSQL服务器?

将Shell更改为Postgres用户 (Change Shell To Postgres User)

PostgreSQL Database server can be accessed with postgres  user which is created during database installation. We can use sudo  command with -i and -u  parameters by specifying username postgres like below.

可以使用在数据库安装期间创建的postgres用户访问PostgreSQL数据库服务器。 通过指定如下用户名postgres我们可以将sudo命令与-i-u参数一起使用。

$ sudo -i -u postgres

使用互动问题创建用户 (Create User with Interactive Questions

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值