Home > Database > phpMyAdmin > body text

Several methods for setting login password in phpmyadmin

藏色散人
Release: 2020-01-02 14:00:13
forward
6609 people have browsed it

The following column phpmyadmin tutorial will introduce you to several methods of setting the login password for phpmyadmin. I hope it will be helpful to friends in need!

Several methods for setting login password in phpmyadmin

config.inc.php

Unconfigured phpMyAdmin is very insecure, vulnerable to attacks, or cannot be used normally at all. phpMyAdmin has 3 types of authorization Mode:

1.cookie: Display a web login page, enter the mysql username and password, and then enter the management interface

2.http: Display a windows login box, enter the mysql user name and password, and then enter the management

3.config: Fill in the mysql user name and password directly into config.inc.php, do not display the login interface, directly enter the management interface

phpMyAdmin The configuration file name is config.inc.php. The modification method of config.inc.php in each version is as follows:

Previous version 2.6: Change config.inc.sample.php to config.inc. php

2.7 version: Change config.default.php to config.inc.php

2.8 version: Use the configuration script '/script/setup.php' to generate the configuration file, the generated file Copy it and save it manually as config.inc.php

Configuration script provided for version 2.8 or above:

1. Use cookie authorization mode to change 'auth_type' to 'cookie', and then modify' blowfish_secret' uses an arbitrary string as the encrypted string of the cookie. If there is no encryption key, the system will display "The configuration file now requires a top-secret phrase password (blowfish_secret)". The configuration file is as follows:

$cfg[' Servers'][$i]['auth_type'] = 'cookie'; $cfg['blowfish_secret'] = '44e2f5aece2855.93921574';

After modification, the web login page in http authorization mode

2. Use config authorization mode

config requires these parameters:

$cfg['Servers'][$i]['auth_type'] = 'config';   //授权模式
$cfg['Servers'][$i]['user'] = 'root';         //mysql登陆用户
$cfg['Servers'][$i]['password'] = '12345';    //mysql登陆用户密码
Copy after login

3. Use http authorization mode

$cfg['Servers'][$i]['auth_type'] = 'http';
Copy after login

http authorization mode login window

Note: If the mysql server uses version 4.1 or above, and the client connection uses mysql 4.1 or below, be careful to use the OLD_PASSWORD function when setting the password for the user,

Example:

mysql > SET PASSWORD = OLD_PASSWORD('12345')
mysql > /G
Copy after login

Appendix: (The following content is written by myself)

In addition to the above three methods that come with phpmyadmin, you can also use the configuration of apache to restrict login, and place a . htaccess file, specify the password record file to use.

Then use htpasswd to generate a password and save it in the password record file (the content of the file is encrypted, use the method htpasswd /etc/php_passwd username).

Contents in httpd.conf:

phpmyadmin's directory"> 
AllowOverride AuthConfig
Copy after login

Contents of .htaccess file

authtype basic authuserfile /etc/php_passwd authname information require valid-user
Copy after login

We can see that the content in the /etc/php_passwd file is similar to this:

username:2Y2CD6nfJuwL6

phpmyadmin Cancel the maximum file limit change solution

When importing a large database with phpmyadmin, it appears:

No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration. See FAQ 1.16.
Copy after login

First check the php.ini configuration file In the following three places, upload_max_filesize, memory_limit and post_max_size, it is recommended that the modified values ​​​​be slightly larger than the imported sql database file; after modifying the above three values ​​​​in php.ini, restart the php environment, or restart the computer, When importing again, although phpmyadmin still displays the maximum import limit: 20,48KB, large database files can be imported successfully.

The above is the detailed content of Several methods for setting login password in phpmyadmin. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template