How to connect to local or AWS RDS database

This article applies to aMiSTACX deployments, and is not meant to replace our admin guide that is provided with the stack.

There are several possibilities on db connections for administration purposes. In this article, we will outline GUI phpMyAdmin usage for both LAMP/LEMP and LAP/LEP [RDS Deployments]

Depending on the version of your stack and the flavor – LAMP or LEMP formats – to connect via phpMyAdmin will vary.

Note! phpMyAdmin is NOT installed on any RDS deployments. Please use the Windows Utility Server stack for connection.

Note! You must wait on average 15 ~ 18 minutes for a CFT deployment to complete. If you are getting a prompt for credentials for the database you are too early or the deployment failed.

G6F & G6SP & older G5/G4/G3/G2s

Stacks > April 2018

https://your_ip_address:8080/phpmyadmin/ #LAMP or LEMP. Note the use of HTTPS ,the trailing “/”, and port 8080.

For most legacy G2 stacks:

http://your_ip_address:8080/phpmyadmin/  #LAMP or LEMP. Note the use of the trailing “/” and port 8080.

For older stacks retired stacks < September 2017

http://your_ip_address/phpmyadmin  #LAMP or LEMP

Note: User is normally root, and password is normally the EC2 ID of the server.

For MySQL RDS

To connect via GUI requires several steps, please refer to the stack guide. You can also make use of our pre-configured Windows Utility server that has connection utilities ready to go, and should allow easy access to the database once you follow the video and/or instructions.

Note: Database information for CFT deployed CMS Magento and WordPress can be found in the configuration files of each.

e.g. /var/www/wordpress/wp-config.php
e.g. /var/www/magento/app/etc/env.php

The password is created on deployment and generally is the EC2 ID of the parent EC2 server.

Connecting to phpMyAdmin via A51

If you registered for A51, you can also connect to phpMyadmin via the A51 console. This feature is for NON RDS stacks.

Troubleshooting

One of the biggest issues that we encounter is improperly configured AWS security groups.

  • For local phpMyAdmin, test with 0.0.0.0/0, then restrict to your IP or close.
  • For RDS, test with 0.0.0.0/0, then lock down using the private IP of the source. If you span regions you need to make RDS public via the AWS RDS admin dashboard. [Not recommended.]
  • Test RDS via CLI. Use mysql -u {user} -h {RDS Endpoint Address} -p {password}
  • All stacks, with only a couple of exceptions, phpMyAdmin should work for NGINX and Apache out-of-the-box. If it does not contact human support.
  • If you messed around with your stack and broke phpMyAdmin, contact human support.
  • Please review our YouTube channel for videos that outline stack deployment.