I use phpmyadmin, and when entering this adress:
www.mydomain.com/phpmyadmin
a login page appears.
Is there any way of disabling it, so it doesn't appear/exist?
Thanks
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
In your config.inc.php file change:
$cfg['Servers'][$i]['auth_type'] = 'config';
and add
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'password';
In centos, locate the file in directory /etc/httpd/conf.d/phpmyadmin.conf/
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
Yep, 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.
Just 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...
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 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 http://www.mydomain.com/
Then whenever you need to access phpmyadmin, you would just have to comment out that line temporarily while you do your work.
To 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
If you disable it then anyone trying that URL will have immediate access to you mysql database and could do anything, including deleting them. The password is here for a reason !
But, there might be a valid reason to do that, maybe you are protecting the directory with an other security ?
您可以使用以下命令将其完全删除:
sudo apt-get purge phpmyadmin
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.