Is there a cli command to add a database to an existing AWS/RDS instance

1.6k Views Asked by At

I am using AWS RDS database service to run mysql database service. I have read that there is no limit with Mysql in the number of databases contained in a single RDS instance. I can then use

mysql -u<username> -p<password> -h<instance.rds.amazon.com> -e "create database additional_dbname"

My question is the following : Is there a cleaner way to achieve this, using rds-cli ? I have RTM, but I couldn't find any reference to such usage.

2

There are 2 best solutions below

1
On BEST ANSWER

As correctly said by tedder42 AWS RDS creates a single database at RDS creation time.

After creating AWS RDS, connect to it as client using

mysql -u <username> -h <instance.rds.amazon.com> -p <password>

After successfully connecting to your rds instance you can fire all queries which you can fire on your local database.

0
On

AWS RDS only creates a single database and root/admin user at creation time. The rest of the databases and users are created by you through a client.