8

could not access phpmyadmin : http://ip/phpmyadmin

it is showing “For security reasons, this URL is only accessible using localhost (127.0.0.1) as the hostname.”

Please suggest me to solve this problem.

4 Answers 4

18

Bitnami Engineer here,

For security reasons, phpMyAdmin is accessible only when using 127.0.0.1 as the hostname. To access it from a remote system, you must create an SSH tunnel that routes requests to the Web server from 127.0.0.1. This implies that you must be able to connect to your server over SSH in order to access these applications remotely.

  • In Windows, you can configure Putty or the SSH client you have to redirect all the request to a specific port (the 8888 one for example) in your machine to the 80 port of the remote machine.

  • For Unix systems, you can use this command to create the SSH tunnel

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

and then use http://localhost:8888/phpmyadmin in the browser.

You can learn more about this in our documentation

https://docs.bitnami.com/aws/apps/wordpress/get-started/access-phpmyadmin/

1
  • How can we remove that default message ? Or Just redirect when it's not via the SSH tunnel ?
    – MimoudiX
    Commented Nov 18, 2023 at 19:42
6

Edit the phpmyadmin conf file at

sudo nano /opt/bitnami/apache/conf/bitnami/phpmyadmin.conf 

and use:

<Directory "/opt/bitnami/phpmyadmin">
Options -Indexes +FollowSymLinks -MultiViews
AllowOverride All
Require all granted
</Directory>
1
  • This reduces the security of the database, but I think its a good temporary workaround. Commented Mar 25 at 21:39
1

As i understand, to access phpmyadmin, you should have a local server where it will run, like wampp or xampp server. Thats why it asks you for 127.0.0.1 (localhost). What are you trying to do? can you give more details?

5
  • 1
    i am trying to open phpmyadmin Commented Mar 4, 2020 at 7:22
  • 1
    okay, but did you set the environment at your machine? you need a local server for it Commented Mar 4, 2020 at 7:23
  • 1
    have you opened it before? or is it the first time? Commented Mar 4, 2020 at 7:23
  • i am using aws bitnami instance, the wordpress website is accessible on ip address but i unable to open phpmyadmin Commented Mar 4, 2020 at 7:25
  • you also need to make config file change as below: Order allow,deny #Allow from 127.0.0.1 Allow from all #this is risky so better put an IP address here
    – NKM
    Commented Feb 23, 2021 at 8:41
1

Solved by modifying the configuration file.

<IfVersion < 2.3 >
 Order allow,deny
#Allow from 127.0.0.1
 Allow from your_ip
 Satisfy all
</IfVersion>
<IfVersion >= 2.3>
#Require local
 Require all granted
</IfVersion>
3
  • 1
    As I mentioned above, phpMyAdmin is only accessible using 127.0.0.1. The solution you posted here is not secure as everyone will be able to access it from now on. If you don't want to use a SSH tunnel, you can allow one specific IP (your public IP) by using Require ip YOUR_IP Commented Mar 17, 2020 at 9:26
  • which file please? Commented Jun 12, 2021 at 16:41
  • 2
    @PauliusNyoumi /opt/bitnami/apache/conf/bitnami/phpmyadmin.conf
    – Abdul Haq
    Commented Aug 3, 2021 at 3:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.