Can';t设置PhpMyAdmin密码(XAMPP&x2B;Windows 7)

Can';t设置PhpMyAdmin密码(XAMPP&x2B;Windows 7),phpmyadmin,xampp,Phpmyadmin,Xampp,抱歉,如果这是在错误的董事会(可能应该在“安全”) 我已尝试从此页面设置用户名和密码http://localhost/security/index.php(第二部分“XAMPP目录保护(.htaccess)),每次它都说它成功了,但当我转到http://localhost/phpmyadmin,它始终处于打开状态,不要求输入用户名和密码。另外,当我打开http://localhost/security/index.php“PhpMyAdmin可通过网络免费访问”仍显示为“不安全” 我检查了C:\

抱歉,如果这是在错误的董事会(可能应该在“安全”)

我已尝试从此页面设置用户名和密码
http://localhost/security/index.php
(第二部分“XAMPP目录保护(.htaccess)),每次它都说它成功了,但当我转到
http://localhost/phpmyadmin
,它始终处于打开状态,不要求输入用户名和密码。另外,当我打开
http://localhost/security/index.php
“PhpMyAdmin可通过网络免费访问”仍显示为“不安全”

我检查了C:\XAMPP\security-xammp.users文件,用户名和密码就在那里

已尝试清理Cookie并重新启动XAMPP

这是我的config.inc.php:

$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'mypassword';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
$cfg['Lang'] = '';

/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';

/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = 'mypassword';
请帮忙,提前谢谢


编辑:其他信息:我在设置“MySQL管理员用户根目录”时也遇到了同样的问题,必须手动编辑/在配置文件中输入密码,无法从此处执行
http://localhost/security/index.php

您需要更改
config.inc.php
文件,以获得如下内容:

/* Authentication type and info */
$cfg['Servers'][$i]['auth_type']            = 'cookie';
$cfg['Servers'][$i]['user']                 = '';
$cfg['Servers'][$i]['password']             = '';
$cfg['Servers'][$i]['AllowNoPassword']      = false;
然后,您必须在每次首次登录(会话)时输入密码


设置
$cfg['Servers'][$i]['auth_type']='config'
强制phpMyAdmin使用存储在配置文件中的用户名和密码(
$cfg['Servers'][$i]['user']
$cfg['Servers'][$i]['password']
)。

谢谢您的回答。它之所以有效,是因为现在它向我询问用户名和密码,而且安全页面显示它是“安全的”(在我注销/清除cookie之前看了一眼)。但当我尝试登录时,使用$cfg['Servers'][$I]['controluser']='pma'的密码失败$cfg['Servers'][$i]['controlpass']='mypassword';。我该怎么办?如果您这样设置配置,那么您使用的是MySQL数据库中的用户名和密码登录到PMA,而不是PMA的配置。换句话说,当PMA处于“打开”状态(不受密码保护)时,您应该访问PMA,进入
用户
部分,创建一些用户,记住他们的登录名和密码,然后使用上述配置“保护”您的PMA,然后仅使用您刚刚设置的登录名和密码登录(针对您刚刚创建的用户)。顺便说一句:如果你想在这里说“谢谢”——用箭头和分数周围的复选标记向上投票和/或接受我的答案。
controluser
controlpass
是phpMyAdmin的内部结构,你不应该以任何方式更改/使用它们。啊,我明白了。再次感谢,特别是所有的解释,我很感激。现在一切都好了。