在Wamp中的PhpMyAdmin中为用户输入密码

rzl*_*nes 22 phpmyadmin wampserver

如何在WAMP服务器上的phpMyAdmin中更改root用户的密码?因为我错误地更改密码后,我被锁定在phpMyAdmin之外.

use*_*670 32

我在phpmyadmin文件夹中的config.inc.php文件.将用户名和密码更改为您为数据库设置的用户名和密码.

    <?php
/*
 * This is needed for cookie based authentication to encrypt password in
 * cookie
 */
$cfg['blowfish_secret'] = 'xampp'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */

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

/*
 * First server
 */
$i++;

/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'enter_username_here';
$cfg['Servers'][$i]['password'] = 'enter_password_here';
$cfg['Servers'][$i]['AllowNoPasswordRoot'] = true;

/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';

/* 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]['designer_coords'] = 'pma_designer_coords';

/*
 * End of servers configuration
 */

?>
Run Code Online (Sandbox Code Playgroud)


小智 14

phpmyadmin文件夹中有一个名为config.inc.php的文件.

文件路径为C:\ wamp\apps\phpmyadmin4.0.4

将auth_type'cookie'编辑为'config'或'http'

$ cfg ['Servers'] [$ i] ['auth_type'] ='cookie';

$cfg['Servers'][$i]['auth_type'] = 'config';
Run Code Online (Sandbox Code Playgroud)

要么

$cfg['Servers'][$i]['auth_type'] = 'http';
Run Code Online (Sandbox Code Playgroud)

当你去phpmyadmin网站时,你会被要求输入用户名和密码.如果您的Web服务器碰巧暴露在外部连接中,这也可以保护外部人员不会访问您的phpmyadmin应用程序.


小智 8

按照以下步骤返回默认设置:

代替

$cfg['Servers'][$i]['AllowNoPassword'] = false;
Run Code Online (Sandbox Code Playgroud)

将其更改为:

$cfg['Servers'][$i]['AllowNoPassword'] = true;
Run Code Online (Sandbox Code Playgroud)

在你的config.inc.php文件中.

不要指定任何密码并将用户名置于之前,这意味着root.

例如

$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
Run Code Online (Sandbox Code Playgroud)

在我编辑完config.inc.php文件后,这对我有用.


dug*_*ets 5

我有一些问题,并使用另一个配置变量修复它

$cfg['Servers'][$i]['AllowNoPassword'] = true;
instead
$cfg['Servers'][$i]['AllowNoPasswordRoot'] = true;
Run Code Online (Sandbox Code Playgroud)

可能会对某人有所帮助