postgresql - 重命名 Amazon RDS 主用户名

标签 postgresql amazon-web-services amazon-rds

更改密码很容易通过控制台完成。在 RDS for PostgreSQL 上创建主用户名后,有什么方法可以更改吗?如果是,怎么办?

最佳答案

您不能更改用户名。您可以查看以下链接,了解如何更改主密码,以及亚马逊是否添加了更改用户名的功能:

尝试在 AWS CLI for RDS 处查找:

 modify-db-instance --db-instance-identifier <value> --master-user-password (string)

--主用户密码(字符串)

The new password for the DB instance master user. Can be any printable ASCII character except "/", """, or "@".

Changing this parameter does not result in an outage and the change is asynchronously applied as soon as possible. Between the time of the request and the completion of the request, the MasterUserPassword element exists in the PendingModifiedValues element of the operation response. Default: Uses existing setting

Constraints: Must be 8 to 41 alphanumeric characters (MySQL, MariaDB, and Amazon Aurora), 8 to 30 alphanumeric characters (Oracle), or 8 to 128 alphanumeric characters (SQL Server).

Amazon RDS 命令行界面 (CLI) 已被弃用。相反,使用适用于 RDS 的 AWS CLI。

通过AWS Management Console ,选择您需要重置密码的实例,点击“修改”,然后选择一个新的主密码。

If you don’t want to use the AWS Console, you can use the rds-modify-db-instance command (as per Amazon’s documentation for RDS) to reset it directly, given the AWS command line tools: rds-modify-db-instance instance-name --master-user-password examplepassword

关于postgresql - 重命名 Amazon RDS 主用户名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29633635/

相关文章:

python-3.x - 如何使用 Python(Boto lib)获取 Amazon S3 存储桶的大小?

sql - 在 Postgresql 的 where 子句中使用别名列

Postgresql json 类查询

amazon-web-services - 是否可以将输出更改为实际的字符串?

amazon-rds - 在本地运行SAM时如何连接RDS实例?

mysql - 间歇性无法连接到 AWS RDS 上的 mysql(错误 2003)

python - 使用 Python 连接到 Amazon RDS Postgresql 数据库时出错

sql - Postgresql:仅当表不存在时如何创建表?

sql - 使用函数子查询更快

git - 无法在 AWS CodeCommit 中 merge pull 请求。提示有冲突,但是远程和本地是最新的