How to disable phpMyAdmin login page?

I use phpmyadmin and when entering this address:

www.mydomain.com/phpmyadmin 

The login page will appear.

Is there any way to disable it so that it doesn't display / exist?

thanks

+7
html security sql php mysql
source share
10 answers

Yes, you can: set a password in the configuration file. BUT, if you use this in your domain, I highly recommend that you completely remove it from the site!

Use a client to access your database — for example, workbench mysql or mysql yog or any of numerous.

If you MUST use phpmyadmin, then why don't you install it on your local computer and add information to it? It is much safer.

+2
source share

In your config.inc.php file:

 $cfg['Servers'][$i]['auth_type'] = 'config'; 

and add

 $cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['password'] = 'password'; 
+14
source share

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 
+12
source share

In centos, find the file in the directory /etc/httpd/conf.d/phpmyadmin.conf/ and uncomment these lines to provide access only to the local system in phpmyadmin and leave users without access to phpmyadmin

 <Directory "/usr/share/phpmyadmin"> Order Deny,Allow Deny from all Allow from 127.0.0.1 </Directory> 

Hope this will be helpful

+8
source share

Just an idea. If someone needs to have PhpMyAdmin installed, you can also “hide it” under a different URL.

In case the Debian / Apache web server finds apache.conf in the phpmyadmin directory and change:

Alias /phpmyadmin /usr/share/phpmyadmin in Alias /yourspecialurl /usr/share/phpmyadmin

Remember to restart Apache with the new configuration ...

+2
source share

If you disable it, anyone trying to use this URL will have immediate access to your mysql database and can do anything, including deleting them. The password is here for some reason!

But there could be a good reason for this, maybe you are protecting the directory with other security?

0
source share

One thing you might want to do is simply use the .htaccess file to redirect this url somewhere, to basically restrict access to that url.

To do this, simply create a .htaccess file in the root directory of your domain and place it in it:

 Redirect 301 /phpmyadmin http://www.mydomain.com/ 

Then, when you need to access phpmyadmin, you just need to temporarily comment on this line while you do your work.

0
source share

To disable the PhpMyAdmin page, you need to edit the configuration file below

vi / opt / lampp / etc / extra / httpd-xampp.conf around line 64:

 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 
0
source share

Preventing remote login does not stop access to phpmyadmin unless you stop it in /etc/phpmyadmin/apache.conf

To enable phpmyadmin OFF access in ubuntu 14.04 with the apache web server , change /etc/phpmyadmin/apache.conf

Search or if you set the alias / phpmyadmin / usr / share / phpmyadmin to the same file.

Add or change the following lines : Cancel the order, Allow to ban all

Restart apache2 using sudo apache2 restart service

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

Restart apache2 using sudo apache2 restart service

0
source share

You can completely remove this command:

 sudo apt-get purge phpmyadmin 
-2
source share

All Articles