Configuration method for phpMyAdmin auto logon and cancel auto logon
- 2021-06-28 11:35:20
- OfStack
1. How to set up phpMyAdmin automatic login?
First find config.sample.inc.php in the root directory and copy a file name to change to config.inc.php (if an config.inc.php file already exists, modify it directly).
Open config.inc.php and find $cfg['Servers'][$i]['auth_type'], will
$cfg['Servers'][$i]['auth_type'] = 'cookie';
Change to
$cfg['Servers'][$i]['auth_type'] = 'config';
Then append the following code below:
$cfg['Servers'][$i]['user'] = 'root'; // Set mysql User name
$cfg['Servers'][$i]['password'] = '123456'; // Set mysql Password
2. How can I cancel the phpMyAdmin automatic login?
Just put
$cfg['Servers'][$i]['auth_type'] = 'config';
Change to
$cfg['Servers'][$i]['auth_type'] = 'cookie';
Save it.
Reminder:
$cfg['Servers'][$i]['auth_type'] has three pending values, cookie, http, config.Most of them are cookie and config.When using cookie in a formal environment, users are required to enter the correct user name and password. When testing a server locally, config is generally used to save development time by not entering the user name and password after session has failed.