Get the App
SLTechnology News&Howtos  ›  Development  › 

The configuration method of realizing automatic login and canceling automatic login by phpMyAdmin

Shulou Source: shulou.com Published: 2022-06-03 15:47:18 11月14日 Update

This article introduces the relevant knowledge of "phpMyAdmin to achieve automatic login and cancel automatic login configuration method". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

First, how to set up phpMyAdmin automatic login?

First find config.sample.inc.php in the root directory and copy a file name to config.inc.php (if you already have a config.inc.php file, you can modify it directly).

Open config.inc.php and find $cfg ['Servers'] [$I] [' auth_type'] and set the

The copy code is as follows:

$cfg ['Servers'] [$I] [' auth_type'] = 'cookie'

Change to

The copy code is as follows:

$cfg ['Servers'] [$I] [' auth_type'] = 'config'

Then add the following code below:

The copy code is as follows:

Mysql user name set by $cfg ['Servers'] [$I] [' user'] = 'root'; / /

$cfg ['Servers'] [$I] [' password'] = '123456password; / / mysql password set

Second, how to cancel phpMyAdmin automatic login?

Just put

The copy code is as follows:

$cfg ['Servers'] [$I] [' auth_type'] = 'config'

Change to

The copy code is as follows:

$cfg ['Servers'] [$I] [' auth_type'] = 'cookie'

Just save it.

Warm reminder:

$cfg ['Servers'] [$I] [' auth_type'] has three optional values, namely, cookie, http, and config. Cookie and config are commonly used. When using cookie in a formal environment, the user is required to enter the correct user name and password, while when testing the server locally, config is generally used to save the user name and password after session failure, so as to save development time.

This is the end of the content of "phpMyAdmin to achieve automatic login and cancel automatic login configuration method". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Code login user password file user name method configuration content more knowledge input practical warm learned next three just dilemma actual Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker NVidia Shulou Information MySQL Linux