我正在使用 Linux Mint 17.3。我开始使用 XAMPP
但遇到了error 2002。这就是我在 phpMyAdmin 中更改 root 密码的原因。之后,我无法访问 phpMyAdmin。我收到这条消息:
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
我搜索了一个解决方案,发现我必须编辑 phpMyAdmin 文件夹中的 config.inc.php 文件。问题是我只能读取文件,而不能编辑它。我应该如何使这个文件可编辑?
最佳答案
解决方法很简单。您需要更改文件的权限。启动终端(您可以使用 Ctrl + Alt + T)并使用以下命令:
cd <directory of your config file>
sudo chmod 644 config.inc.php
该文件应该是可编辑的,以便您进行更改。
确保在保存对文件的更改后重新启动 XAMPP 服务器。
关于php - 更改密码后拒绝访问 phpMyAdmin,config.inc.php 仅可读,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38845662/