Monday 22 February 2016

how to secure "http://localhost/phpmyadmin/" phpmyadmin on your LAN XAMPP 5.X

 goto C:\xampp\phpMyAdmin

open
 config.inc.php

edit the ff:

Set the Login type to use HTTP Basic authentication (cookie is default):
$cfg['Servers'][$i]['auth_type'] = 'http'; Configure phpMyAdmin to access MySQL directly on IP 127.0.0.1. *There is no point in resolving "localhost", and this will also remove the chance of localhost resolving to IPv6 loopback address "::1", which MySQL might not be bound to (causing all kinds of issues):
$cfg['Servers'][$i]['host'] = '127.0.0.1'; Allow users to login that have no password set (ex: root):
$cfg['Servers'][$i]['AllowNoPassword'] = true; Define phpMyAdmin's Control user (internal use):

$cfg['Servers'][$i]['controlhost'] = 'localhost';
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = 'pmapass';
Use all of the advanced phpMyAdmin features:

$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
$cfg['Servers'][$i]['relation'] = 'pma__relation';
$cfg['Servers'][$i]['table_info'] = 'pma__table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma__column_info';
$cfg['Servers'][$i]['history'] = 'pma__history';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';

Gilmon D. Bernal