add new DB inside aurora cluster

0

Hi Team,

I would like to know how can I add a second Database in my RDS aurora DB? each time I "create Database" it will create a new cluster, but I don't want a new aurora cluster I just want to have another DB inside the same cluster.

2개 답변
0
수락된 답변

You need to connect to your cluster using the master user and simply create a new DB using SQL. For example:

CREATE DATABASE mydatabase;
profile picture
MG
답변함 2년 전
profile picture
전문가
검토됨 24일 전
  • how can connect to my cluster using bastion host with a command line connect to it?

  • Please take a look at Karthikeyan answer, he explained how to connect to the RDS Cluster :) If you need to connect through a bastion host, remember about properly configuring SecurityGroups and enabling SSH Agent forwarding in your ssh client.

0

Hi AWS-User-5483303,

If you are trying to connect to the Aurora DB instance from you bastion, there are few pre checks that you might need to do before using the command line to connect to the aurora instance,

Prechecks:

  • Ensure that your bastion instance is able to reach to the aurora cluster(Assuming both Aurora DB instance and Bastion host are in same VPC).For this to happen, you have to ensure that Aurora Cluster Security Group allows bastion security group to connect over the Aurora DB instance over the desired port (Default -> MYSQL 3306; PSQL 5432). Meaning to say inbound rule of Aurora SG should allow Bastion SG on desired port number
  • You should have installed the desired driver for you to connect to aurora DB instance. Depending on the Aurora engne(MYSQL/PSQL), install the desired driver for you to connect to the instance.

Connectivity Steps:

Follow the below documentation once you are done with the prechecks:

https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Connecting.html

Below are the commands to connect based on the engine:

  • MYSQL -> mysql -h <<db_writer/reader_endpoint>> -d <<database_name>> -u <<username>> -p
  • PSQL -> psql -h <<db_writer/reader_endpoint>> -d <<database_name>> -U <<username>> -W

Once you connect you should be able to create database using the command "CREATE DATABASE <<dbname>>;"

답변함 2년 전
profile picture
전문가
검토됨 24일 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠