How to set the password for logging on to phpmyadmin _ PHP Tutorial

Source: Internet
Author: User
Tags http cookie mysql tutorial mysql login
You need a password to log on to phpmyadmin. Open config. inc. php Tutorial 1. use the cookie authorization mode to change auth_type to cookie, and then modify blowfish_secret to use an arbitrary string as the cookie's encrypted string. if config is not found. inc. php Tutorial

1. change 'auth _ type' to 'cookies' in cookie authorization mode, and then modify 'blowfish _ secret' to use an arbitrary string as the cookie's encrypted string. If no encryption key exists, the system displays "the configuration file currently requires a top secret phrase password (blowfish_secret)". the configuration file is as follows: $ cfg ['servers'] [$ I] ['auth _ type'] = 'cooker'; $ cfg ['blowfish _ secret'] = '44e2f5aece2855. 93921574 '; after modification, enter the logon window
4
Web login page in http authorization mode

II. use the config authorization mode
Config requires these parameters:
$ Cfg ['servers'] [$ I] ['auth _ type'] = 'config ';
// Authorization mode $ cfg ['servers'] [$ I] ['user'] = 'root ';
// Mysql tutorial login user $ cfg ['servers'] [$ I] ['password'] = '2016 ';
// Mysql login user password

Change config. inc
$ Cfg ['servers'] [$ I] ['auth _ type'] = 'cooker'; // Authentication method (config, http or cookie based )?
Note: it is not an http cookie !!!

3. use http authorization mode
$ Cfg ['servers'] [$ I] ['auth _ type'] = 'http ';

Http authorization mode logon window
Note: If the mysql server uses version 4.1 or later and the client connection uses the mysql4.1 version, use the OLD_PASSWORD function when setting the password for the user. for example:
Mysql> set password = OLD_PASSWORD ('20140901 ')
Mysql>/G
Appendix: (The following content is self-written) in addition to the three built-in phpmyadmin methods, you can also use apache configuration to restrict logon and place one under the phpmyadmin directory. htaccess file, specifying the password record file used. Then, use htpasswd to generate a password and save it in the password record file (the file content is encrypted. use htpasswd/etc/php_passwd username ).
Content in httpd. conf: phpmyadmin's directory "> AllowOverride AuthConfig
. Htaccess file content
Authtype basic authuserfile/etc/php_passwd authname information require valid-user
We can see that the content in the/etc/php_passwd file is similar to this:
Username: 2Y2CD6nfJuwL6


More detailed tutorial

Open the libraries file in phpMyAdmin, find config. default. php, and open.

Locate $ cfg ['servers'] [$ I] ['user'] = ''and add 'root''

Find $ cfg ['servers'] [$ I] ['password'] = '', and add '123' ';

You can add the username and password of the Mysql instance you just installed.


Modify the configuration file.
Config. inc. php

/* $ Id: config. sample. inc. php 9689 2006-11-10 20: 05: 49Z nijel $ */
// Vim: expandtab sw = 4 ts = 4 sts = 4:

/**
* PhpMyAdmin sample configuration, you can use it as base
* Manual configuration. For easier setup you can use scripts/setup. php
*
* All directives are explained in Documentation.html and on phpMyAdmin
* Wiki */

/*
* This is needed for cookie based authentication to encrypt password in
* Cookie
*/
$ Cfg ['blowfish _ secret'] = 'afafafaf';/* you must fill in this for cookie auth! */

/*
* Servers configuration
*/
$ I = 0;

/*
* First server
*/
$ I ++;
/* Authentication type */
$ Cfg ['servers'] [$ I] ['auth _ type'] = 'cooker ';
/* Server parameters */
$ Cfg ['servers'] [$ I] ['host'] = 'localhost ';
$ Cfg ['servers'] [$ I] ['connect _ type'] = 'tcp ';
$ Cfg ['servers'] [$ I] ['compus'] = false;
/* Select mysqli if your server has it */
$ Cfg ['servers'] [$ I] ['extension'] = 'mysql ';
/* User for advanced features */
$ Cfg ['servers'] [$ I] ['controluser'] = ''; // User name
$ Cfg ['servers'] [$ I] ['controlpass'] = ''; // password
/* 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 _ page'] = 'PMA _ pdf_pages ';
// $ Cfg ['servers'] [$ I] ['column _ info'] = 'PMA _ column_info ';
// $ Cfg ['servers'] [$ I] ['History '] = 'PMA _ history ';
// $ Cfg ['servers'] [$ I] ['designer _ coords '] = 'PMA _ designer_coords ';

/*
* End of servers configuration
*/

/*
* Directories for saving/loading files from server
*/
$ Cfg ['uploaddir'] = '';
$ Cfg ['savedir'] = '';

?>

Authorization 1. use the cookie authorization mode to change 'auth _ type' to 'cookier', and then modify 'blowfish _ secret' to use an arbitrary string as the cookie's encrypted string. If no...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.