PHPMyAdmin doesn#39;t connect after root password change(更改root密码后PHPMyAdmin无法连接)
问题描述
我安装了 Xampp(适用于 Windows).我很高兴使用它的所有功能.
I installed Xampp (for Windows). I was happily using it with its all features.
然后我想更改 MySql 密码.我设置了一个随机生成的密码(rCZ4Xnz78zbLY2Vh).然后PHPMyAdmin停止登录.它开始给出以下错误消息,此后一直如此:
Then I wanted to change MySql password. I set a randomly generated password (rCZ4Xnz78zbLY2Vh). Then PHPMyAdmin stopped logging in. It started to give the following error message, and it is the same ever since:
然后我编辑了PHPMyAdmin的config.inc.php"文件,其内容如下:
Then I edited the `config.inc.php" file of PHPMyAdmin, and made its contents exactly as below:
但是我可以通过命令行使用相同的密码连接到 MySql 服务端.
But I was able to connect to the MySql servier via command line by the same password .
然后我通过命令行界面删除了密码:
Then I removed the password via the command line interface:
我还从 config.inc.php
文件中删除了密码.该文件中的相关行现在是:
I also removed password from the config.inc.php
file. The relevant lines in that file are now:
目前很奇怪,我用我删除的密码可以连接,但我用空密码无法连接:
Currently, it is strange but, I can connect with the password I deleted, but I cannot connect with empty password:
我想为这个用户分配另一个随机密码,并且我想通过 PHPMyAdmin 访问我的数据库,就像我之前在全新的 Xampp 安装中所做的那样.我该怎么办?我真的很困惑,我需要你的帮助.
I want to assign another random password to this user, and I want to access my database via PHPMyAdmin, as I did within the fresh Xampp installation before. What should I do? I'm really confused and I need your help.
这就像 config.inc.php
文件的内容被忽略了.我从模板文件 config.sample.inc.php
中复制了它并更改了它的内容.它现在位于目录 Xamppphpmyadmin
中.
It is like the config.inc.php
file contents are ignored. I copied it from the template file config.sample.inc.php
and altered its contents. It is now located in the directory Xamppphpmyadmin
.
版本:
推荐答案
你需要编辑phpMyAdmin目录下的config.inc文件(可能是C:xamppphpMyAdmin)并修改这一行来匹配你输入的密码在 phpMyAdmin 中根.
You need to edit the config.inc file in the phpMyAdmin directory (probably C:xamppphpMyAdmin) and change this line to match the password you entered for root in phpMyAdmin.
$cfg['Servers'][$i]['password'] = ' ';
$cfg['Servers'][$i]['password'] = ' ';
这篇关于更改root密码后PHPMyAdmin无法连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!