DEV Community

Hiren Dhaduk
Hiren Dhaduk

Posted on

How do I connect with AWS RDS? (using MySQL workbench)

AWS RDS is a database service by Amazon that is used to launch highly scalable database clusters. The service hones database engines like Amazon Aurora, MySQL, MariaDB, Oracle, and PostgreSQL. Instead of providing shell access to the database server, AWS is only responsible for providing a connection string to connect with the database server.

AWS RDS (Relational Database Service) is a managed database service provided by Amazon Web Services to launch a highly available and scalable database cluster. AWS RDS provides different database engines like Amazon Aurora, MySQL, MariaDB, MS SQL Server, Oracle, and PostgreSQL. AWS does not provide shell access to the database server; it only provides a connection string to connect to the database server.

There are various methods that can be used to connect with the RDS database. But, by far, the most popular one is connecting with MySQL Workbench. Let’s take a closer look at how it’s done!

Connect using MySQL Workbench

MySQL Workbench is a GUI application that is readily available for Windows, Linux, and macOS. Apart from providing visibility to relational databases, it is used to provide a query tool to perform SQL queries. Here are the steps that you to follow in order to connect to Amazon RDS using MySQL Workbench

  • Install the workbench on your local machine. If you are using Linux or Ubuntu, it is advisable to update your repositories before installing MySQL Workbench.
  • Create an AWS RDS instance from the AWS management console specifying the region where you want to deploy your instance.

Image description

  • Select standard create and MySQL as the Engine type

Image description

  • Configure the whole setup using Amazon AWS guidelines to prepare RDS for connecting with MySQL workbench.
  • Once the configuration is complete, go to MySQL Workbench, and click on the (+) symbol to add database parameters.

Image description

  • Enter all the connection parameters and click on Test Connection to connect with the database server.

Image description

  • Once you do that, it will ask you for the password of the RDS instance. Enter the password and click OK to test the connection.

Image description

  • After entering the password, a notification will pop up telling you whether or not the connection is successful.

Image description

  • Once the test is complete, for a new connection, click on the “OK” button instead of “Test Connection” to add the AWS RDS instance connection.

Image description

  • It will automatically add a MySQL connection on the MySQL Workbench dashboard.

Image description

  • For connecting with the AWS RDS instance, double-click on the newly formed connection, and it will start the RDS instance.

Image description

  • A popup window will appear which will ask you for the RDS password again. Enter the password and click OK to connect to the instance.

Image description

  • After connecting with the instance, it will open an intuitive GUI for the RDS on the MySQL Workbench.

Image description

  • For creating a new schema using MySQL Workbench, click on the “new schema” button on the menu bar.

Image description

  • A new tab will open up asking for a schema name to be created.

Image description

  • After new schema name is created, it will open a new window with the SQL query to create the new schema.

Image description

Top comments (0)