Connect to RDS Instance
To connect to an RDS Instance whose Database Engine is MySQL or MariaDB, you can use any MySQL client such as mysql-client (the CLI client built by MySQL), MySQL Workbench (the GUI client built by MySQL), Heidi, and so on.
For PostgreSQL, you can use clients such as psql (the CLI client built by PostgreSQL) or pgAdmin (a popular GUI client).
The guide below uses mysql-client, MySQL Workbench and psql:
Step 0. Install a client tool
To install MySQL Workbench (Windows/Linux), download it from MySQL:
https://dev.mysql.com/downloads/workbench/
To install MySQL-Client (Linux):
Ubuntu:
sudo apt-get install mysql-clientCentOS:
sudo yum install mysqlTo install psql (Linux/MacOS):
Ubuntu:
CentOS:
MacOS:
Step 1. Identify the Endpoint & Port
On the Database management interface, select the RDS Instance you have just created, go to the Connectivity & Security tab and look at the Endpoint & Port section.
To tell a Public Endpoint from a Private Endpoint, check the Networking section to find the Private Network Subnet of this RDS Instance.
For example, if the DB Instance has the Private Network Subnet 10.0.116.0/24, then 10.0.116.3 is the Private Endpoint.
Step 2. Adjust Security Group Rules to protect the DB Instance (optional)
The Security Group Rules section lets you restrict which Remote IP addresses may reach your RDS Instance. For convenience, a newly created RDS Instance accepts connections from anywhere (0.0.0.0/0). GreenNode recommends narrowing this down so that only trusted Remote IP addresses have access.
To change it, click EDIT and fill in the appropriate IP range (in CIDR notation).
After editing, click Save and wait a moment for the change to take effect.
To make sure the path is open, you can use a tool such as telnet.
Once the connection goes through, you can start connecting to the RDS Instance.
Step 3. Connect with client tools
Once you have the endpoint, use the Master User you created to connect.
Note: the master user is created only once. If you forget the password, select Action > Edit Database to change it yourself. If you forget the Master User itself, contact GreenNode Support for assistance.
For example, if the RDS Instance you just created has master user dba, public endpoint 61.28.224.201 and port 3306, you connect as follows:
On Linux (Ubuntu, CentOS) you can use mysqlclient directly (it usually ships with the operating system):
On Windows/Linux/MacOS you can download MySQL Workbench at: https://dev.mysql.com/downloads/workbench/
Workbench
Workbench is the client tool built by MySQL itself, with an intuitive graphical interface. You can also use Workbench on Linux machines (Ubuntu, CentOS).
After downloading and installing Workbench, on the start screen select Database > Connect to Database and fill in the required information:
Connection Name: a memorable name for this connection so you can tell it apart from others.
Hostname: the vDB IP Endpoint, here 61.28.244.201
Port: keep the default 3306. (Connecting to the database on another port is not supported.)
Username: your Master User, here dba
Once you are sure the information is correct, click Test Connection. A dialog asks for the password; you can tick Save Password in vault so Workbench remembers it for later sessions.
Note that if you use Workbench against MariaDB or an older MySQL version, you will see a compatibility warning. You can ignore it and select Continue Anyway.
For PostgreSQL, use psql with the following syntax and enter the password you registered when creating the vDB:
where:
Endpoint_vDB: the endpoint used to connect to the vDB.
Master_user: the master user you registered at creation time.
Database_Name: the Database Name you entered under DB Options. (This differs from the DB Instance Name under DB Settings at creation time, which is what the portal shows under Database.) If you forget it, contact GreenNode Support to retrieve it.
For PostgreSQL Cluster, for extra security you can add sslmode=require to the connection string, for example: psql "host=<Endpoint_vDB> port=5432 dbname=<Database_Name> user=<master_user> sslmode=require".
If you need any assistance, contact the GreenNode Support Team. Thank you for reading this guide.
Last updated

