cfn-aws-three-tier-demo stack, check the MySQLDatabaseEndpointAddress value.

exit command to return to the Bastion Host.
The Bastion Host has the MySQL client (mariadb105) installed, and the Database Security Group allows connections from the Bastion Host.
Connect to the database with the following command and enter the MasterUserPassword value when prompted for the password:
exit
mysql -h <MySQLDatabaseEndpointAddress> -u <MasterUsername> -p

After connecting successfully, run the following commands to list the databases and exit:
SHOW DATABASES;
exit

On the Bastion Host, check the TCP connection to port 3306 of the database:
nping -p 3306 <MySQLDatabaseEndpointAddress>

demo-database database.

