Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to rename an Amazon RDS hosted PostgreSQL database

I have restored a snapshot from an existing RDS PostgreSQL database. Now I want to rename that database but can't find how to do it anywhere in the AWS documentation.

Nor can I find how to use the master password (which I expect let's me do it).

like image 584
kev Avatar asked Jun 22 '16 05:06

kev


People also ask

What is the database name in RDS?

Amazon RDS currently supports MySQL, MariaDB, PostgreSQL, Oracle, Microsoft SQL Server, and Amazon Aurora database engines. When creating a DB instance, some database engines require that a database name be specified. A DB instance can host multiple databases, or a single Oracle database with multiple schemas.

How do I create a DB name in RDS?

In the upper-right corner of the Amazon RDS console, choose the AWS Region in which you want to create the DB instance. In the navigation pane, choose Databases. Choose Create database. In Choose a database creation method, select Standard Create.

How do I change my master name on RDS?

With RDS for MySQL, the answer is no, the master username cannot be changed, presumably because permissions are tied to usernames, and changing the username would leave the database objects with that user as DEFINER stranded without a valid definer.


1 Answers

Logging in with postgres into template1 database and then ALTER DATABASE foo RENAME TO bar; worked

like image 133
kev Avatar answered Oct 06 '22 18:10

kev