phpMyAdmin - 无法连接 - 无效的设置 - 自从我添加了root密码 - 锁定了

Ora*_*ind 47 mysql phpmyadmin root

我运行XAMPP,几天前我通过phpmyadmin为root密码设置了密码我从那时起就无法访问phpMyAdmin

我在这个链接上关注了帮助但是那里的一切看起来都很好(在config.inc.php中).我甚至尝试完全unistalling xampp,重新启动Windows然后重新安装xampp,但仍指向localhost/phpmyadmin我收到以下错误

MySQL said: 
Cannot connect: invalid settings. 
phpMyAdmin tried to connect to the MySQL server, and the server rejected the
connection. You should check the host, username and password in your
configuration and make sure that they correspond to the information given
by the administrator of the MySQL server.
Run Code Online (Sandbox Code Playgroud)

我还尝试通过mysq的网站帮助中给出的mysqld.bat重置root密码,但无济于事

请帮忙!这是描述情况的屏幕截图: 在此输入图像描述

Sae*_*ros 94

进入XAMPP安装文件夹中的phpMyAdmin目录.将有一个名为config.inc.php的文件.在该文件中,找到以下行:

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

你必须确保这个字段有你的mysql root密码(你设置的密码).

  • 我也这样做了,仍然没有发生任何事 (3认同)

agi*_*les 17

PHPMYADMIN - 无法连接:无效设置.

我也面临类似的问题,但现在我找到了解决办法.

对于wamp服务器:

IN:C:\ wamp\apps\phpmyadminVERSION\config.inc.php

$cfg['Servers'][$i]['AllowNoPasswordRoot'] = true; 

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

对于xampp服务器:

因为xampp服务器有以下设置.

C:\ XAMPP的\ phpMyAdmin的\ config.inc.php文件

$cfg['Servers'][$i]['user'] = 'root';

$cfg['Servers'][$i]['password'] = ''; // which is default setting in xampp server

$cfg['Servers'][$i]['password'] = 'your password';//type your password you have changed
Run Code Online (Sandbox Code Playgroud)

  • +1.`$ cfg ['Servers'] [$ i] ['AllowNoPassword'] = false;`这解决了xaamp的问题.我更改了密码字段的密码后,我无法登录. (2认同)

小智 9

我有类似的问题,在更改root密码后无法在测试服务器上访问phpmyadmin.我尝试了上面提到的所有内容,包括来自其他论坛的建议,使用配置文件的各种变体.然后我记得Google Chrome在使用测试服务器时遇到了一些问题.原因是Chrome具有防止从远程网站访问本地硬盘驱动器的安全功能 - 遗憾的是,这可能会导致测试环境出现问题,因为服务器是本地硬盘驱动器.当我尝试使用Internet Explorer登录phpmyadmin时,它工作正常.我尝试了几项Chrome v IE9测试,Chrome无法在任何配置下使用root密码设置.我也测试了Firefox它也运行良好,问题只与Chrome有关.我的建议:如果您在测试服务器上,请确保您的配置文件具有如上所述的正确设置,但如果问题仍然存在并且您正在使用Chrome,请尝试使用其他浏览器.


小智 8

第1步:转到

http://localhost/security/xamppsecurity.php

第2步:设置/修改您的密码.

第3步:使用编辑器打开C:\ xampp\phpMyAdmin\config.inc.php.

第4步:检查以下行:

$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'your_password';

// your_password = the password that you have set in Step 2.
Run Code Online (Sandbox Code Playgroud)

步骤5:确保以下行设置为TRUE:$ cfg ['Servers'] [$ i] ['AllowNoPassword'] = true;

步骤6:保存文件,从XAMPP控制面板重新启动MySQL

第7步:使用root和密码登录phpmyadmin.

注意:如果再次出现相同的错误,请检查安全页面:

http://localhost/security/index.php

它会说:MySQL管理员用户root不再没有密码SECURE
PhpMyAdmin密码登录已启用.安全

然后重启你的系统,问题就解决了.