How to Access phpMyAdmin in Bitnami Instance on AWS Lightsail

This article shows two procedures to connect to phpMyAdmin in Bitnami Instance on Amazon Lightsail.

How to Access phpMyAdmin in Bitnami Instance on Amazon Lightsail

Access phpMyAdmin in Local Network​

By default, http://127.0.0.1:8888/phpmyadmin is the link where you can manage your MySQL database, which is not accessible on the regular internet. It's only accessible from the local host, So you would need to set up an SSH tunnel every time you want to access that link. So, in this article, I will show how to connect phpmyadmin from your local network.

Access PhpMyAdmin On Windows​

Access PhpMyAdmin On Linux And MacOS​

To access the application using your Web browser, create an SSH tunnel, as described below.

  • Open a new terminal window on your local system (for example, using “Finder -> Applications -> Utilities -> Terminal” in macOS or the Dash in Ubuntu).
  • Make sure that you have your SSH credentials (.pem key file) in hand.
Run the following command to configure the SSH tunnel using the SSH key file. Remember to replace KEYFILE with the path to your private key and SERVER-IP with the public IP address or hostname of your server:

ssh -N -L 8888:127.0.0.1:80 -i KEYFILE bitnami@SERVER-IP

EXAMPLE:

ssh -i "<span>key_LAMP_Server_2.pem</span>" bitnami@<span>35.182.62.166</span> Or, ssh -N -L <span>8888</span>:127.0.0.1:<span>80</span> -i "<span>key_LAMP_Server_2.pem</span>" bitnami@<span>35.182.62.166</span>
  • Remember that if you are redirecting HTTP requests to the HTTPS port, you must use destination port 443 instead of 80.
    NOTE: If successful, the above command will create an SSH tunnel but will not display any output on the server console.
  • Access the phpMyAdmin console through the secure SSH tunnel you created, by browsing to .
  • Log in to phpMyAdmin by using the following credentials:
    • Username: root
    • Password: application password. (Refer to our FAQ to learn how to find your application credentials).

Access phpMyAdmin From a Public Network​

As you know if you want to connect phpmyadmin you need to connect the SSH tunnel every time which is good for a productive environment for security reasons. But in case you're just doing some testing? I don't know i find it quite annoying to always set an SSH tunnel. So I'm also showing you how to change that, and it's pretty straightforward we just need to change settings in phpmyadmin.conf file, if you have the bitnami installation it's usually in the following folder;

/opt/bitnami/apache/conf/bitnami/
  • Edit the following file using your favorite text editor and replace Require local with Require all granted
sudo nano /opt/bitnami/apache/conf/bitnami/phpmyadmin.conf Alias /phpmyadmin "/opt/bitnami/phpmyadmin" <Directory "/opt/bitnami/phpmyadmin"> Options -Indexes +FollowSymLinks -MultiViews AllowOverride All Require all granted ErrorDocument 403 "For security reasons, this URL is only accessible using localhost (1> # AuthType Basic # AuthName phpmyadmin # AuthUserFile "/opt/bitnami/apache/users" # Require valid-user </Directory>
  • Restart all services using the following command:
sudo /opt/bitnami/ctlscript.sh restart
  • Then open any of the following links in your browser:
http://<span>your_server_iP</span>/phpmyadmin

Or

http://<span>example_domain.com</span>/phpmyadmin
 

About us

  • oDiscuss Community provides a forum platform for discussing, sharing resources and ideas, and finding answers on various topics, including technology, IT, IT systems, networking systems, computers, servers, blogging, digital marketing, SEO, web design, web development, and more.

Quick Navigation

User Menu