Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to disable remote login to phpmyadmin

The title pretty much sums up my question. I just want to find out how to disable remote login to my phpmyadmin. I would rather only being able to log into phpmyadmin from localhost.

like image 906
user1425394 Avatar asked May 30 '12 07:05

user1425394


2 Answers

Edit /etc/phpmyadmin/apache.conf with :

    Order Allow,Deny
    Allow from localhost
like image 185
maxdec Avatar answered Sep 24 '22 07:09

maxdec


Preventing remote login doesn’t stop access to phpmyadmin if you have not stopped it in /etc/phpmyadmin/apache.conf

To turn the access to phpmyadmin OFF in ubuntu 14.04 with apache web server, edit /etc/phpmyadmin/apache.conf

Search for <Directory /phpmyadmin> or <Directory /usr/share/phpmyadmin> if you set the Alias /phpmyadmin /usr/share/phpmyadmin in the same file.

Add or Edit following lines:

Order Deny,Allow
Deny from all

Restart apache2 with sudo service apache2 restart

To turn the access to phpmyadmin ON temporarily, first find out your ip address. Search Google, what is my ip address. Then edit vi /etc/phpmyadmin/apache.conf file. Add this line to the above mentioned Directory tag: Allow from <your ip address>

Restart the apache2 with sudo service apache2 restart

like image 45
KawaiKx Avatar answered Sep 24 '22 07:09

KawaiKx