I use phpmyadmin, and when entering this adress:
a login page appears.
Is there any way of disabling it, so it doesn't appear/exist?
Thanks
19 Answers
You can disable phpMyAdmin by disabling the module configuration.
sudo a2disconf phpmyadmin.conf sudo /etc/init.d/apache2 restart Enable it with
sudo a2enconf phpmyadmin.conf sudo /etc/init.d/apache2 restart 1In your config.inc.php file change:
$cfg['Servers'][$i]['auth_type'] = 'config'; and add
$cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['password'] = 'password'; 3In centos, locate the file in directory /etc/httpd/conf.d/ and uncomment these lines to only give access on the local system to phpmyadmin, and leave the users from outside with no access to phpmyadmin
<Directory "/usr/share/phpmyadmin"> Order Deny,Allow Deny from all Allow from 127.0.0.1 </Directory> Hope this be helpfull
1Yep, you can: set your password in the config file. BUT if you are using this on your domain then I'd strongly recommend you take it off your site altogether!
Use a client to access your database - like mysql workbench or mysql yog or any of the numerous ones out there.
If you MUST use phpmyadmin then why not install it on your local machine and add the details to the config there? It is much safer.
3Preventing 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 or 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
Restart the apache2 with sudo service apache2 restart
One thing you may want to do is just use a .htaccess file to redirect that URL somewhere to basically restrict the ability to get to that URL.
To do this, just create a .htaccess file at the root directory of your domain and put this in it:
Redirect 301 /phpmyadmin Then whenever you need to access phpmyadmin, you would just have to comment out that line temporarily while you do your work.
2Just an idea. If someone must have PhpMyAdmin installed, it is also possible to "hide it" under another url.
In case of a Debian/Apache web server find the apache.conf in the phpmyadmin directory and change:
Alias /phpmyadmin /usr/share/phpmyadmin to Alias /yourspecialurl /usr/share/phpmyadmin
Don't forget to restart Apache with the new config...
1To disable PhpMyAdmin page need to edit an configuration file as below
vi /opt/lampp/etc/extra/httpd-xampp.conf around 64th line edit:
Deny from all TO Deny from none Order deny,allow Deny from all /*none*/ Allow from ::1 127.0.0.0/8 \ fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \ fe80::/10 169.254.0.0/16
You can remove it completely with this command:
sudo apt-get purge phpmyadmin 3