Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create table in RDS database on amazon web service

I am using AWS Amazon Web Service RDS for database. I have set up a database instance but how should I add the tables in that database instance or create any new tables in the database? Any idea how to add table?

like image 599
Aijaz Ali Avatar asked Dec 03 '13 05:12

Aijaz Ali


1 Answers

Is your database in private or public subnet? That matters as it will affect how we can connect to it. If your RDS database is in a private subnet, then you cannot directly connect to it with a SQL client like MySQL Workbench from your PC.

I would advise you to put the database in private subnet for security concerns.

Now let's assume your database is in private subnet. What you can do is to rent a very cheap EC2 instance as a bastion instance in a public subnet. You can use SSH over TCP/IP or SSH tunneling to connect to this RDS instance even from outside your VPC as mentioned here https://www.youtube.com/watch?v=gM7JvNMOUQM.

Here is a blog that has some details of how to do it. https://bobbyhadz.com/blog/aws-cdk-rds-example

like image 72
Yang Liu Avatar answered Oct 03 '22 23:10

Yang Liu