如何更改“数据库名称”?适用于Postgresql的AWS RDS中? [英] How can I change the "Database Name" in AWS RDS for Postgresql?

查看:290
本文介绍了如何更改“数据库名称”?适用于Postgresql的AWS RDS中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建生产数据库的副本以进行登台,并从生产快照中创建登台数据库实例。但是,此新实例仍具有数据库名称: production-database。我能够将PSQl上的数据库重命名为 staging-databse,但这未反映在AWS控制台中。恐怕将来的开发人员会很困惑,并且想知道如何在AWS上重命名数据库名称?

解决方案

不要使用默认的数据库选项。它所做的只是默认情况下创建一个自定义名称的数据库。它可能有用途,但我从未使用过,因为它似乎无济于事,除了指定默认情况下(首次创建实例时)创建的数据库的命名方式。


数据库名称



如果要为其指定数据库名称默认数据库,键入数据库名称,最多63个字母数字字符。如果未提供名称,则会创建默认的 postgres数据库。



http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CreatePostgreSQLInstance.html




此后显然不能更改,因此比什么都更令人烦恼。我总是将此空白留空。


I wanted to create a replicate of my production database for staging and created the staging DB instance from a production snapshot. However, this new instance still has the Database Name: "production-database". I was able to rename the database on PSQl to "staging-databse," but this is not reflected in the AWS Console. I'm afraid that future developers will be very confused, and was wonderign how to rename the "Database Name" on AWS?

解决方案

Don't use the default database option. All it does is create a custom-named database by default. There may be uses for it, but I never use it, because it seems to serve no purpose at all other than to specify what the database that's created by default (when the instance is first created) will be named.

Database Name

If you want to specify a database name for the default database, type a name for your database of up to 63 alpha-numeric characters. If you do not provide a name, the default "postgres" database is created.

http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CreatePostgreSQLInstance.html

I assume this is intended to be a convenience for new RDS users, but to me, it seems unnecessary. It has no apparent impact on ongoing operation of the instance, which can, of course, have multiple independent databases on it.

This apparently can't subsequently be changed, so it's more of an annoyance than anything. I always leave this blank.

这篇关于如何更改“数据库名称”?适用于Postgresql的AWS RDS中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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