How to Access phpMyAdmin on AWS Lightsail (Secure Method)

AWS Lightsail doesn’t expose phpMyAdmin publicly — instead, you access it securely using an SSH tunnel. This keeps your database private and protected.

Download Your SSH (P-E-M) Key

From the Lightsail console, download your instance’s SSH key. You’ll need this file to authenticate.

Create an SSH Tunnel

Open a terminal and create an SSH tunnel that forwards a local port to the server’s web port.

Example:

ssh -i /path/to/your-key.pem -N -L 8888:127.0.0.1:80 bitnami@YOUR_SERVER_IP

Once connected, open your browser and go to:

http://localhost:8888/phpmyadmin

Get Your Database Credentials

Open a second terminal tab and SSH into the server normally, then view your WordPress config file:

cat /opt/bitnami/wordpress/wp-config.php

To learn more about creating an SSH Connection, check out my tutorial on how to SSH into AWS Lightsail.

Note: When you close the SSH tunnel terminal, phpMyAdmin will immediately disconnect. This is expected and normal.

Continue Exploring

Explore All Guides

Tools We Recommend

Recommended Tools

Shopify

Shopify is one of the most powerful all-in-one eCommerce platforms available today, designed to help anyone—from beginners to…

4.7
Updraft

UpdraftPlus Review – The Easiest Way to Back Up Your WordPress Website If you’re running a WordPress site…

4.7
Free / Pro from $70/yr (2 sites)
Zillion Designs

At manzari.com, we’ve been using Zillion Designs since 2015 as our go-to platform for logo design and brand…

4.5
From $199 (+ 20% processing fee)

Affiliate links — we may earn a commission at no extra cost to you.

About Manzari

Manzari is an independent publisher focused on WordPress, website technology, business software, and practical tech guides. Our goal is to help you choose better tools and make informed decisions with honest, transparent recommendations.

57+
In-depth WordPress guides
23+
Real tools tested & reviewed
21yr
Building with WordPress
100%
No paid placements, ever