php - 更改密码后拒绝访问 phpMyAdmin,config.inc.php 仅可读

标签 php mysql linux

我正在使用 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/

相关文章:

php - 查找路线起点和终点周围的标记 (LatLng)

php - 未通过 PHP 将 Json 对象中的所有数据获取到数据库中

mysql - 慢速查询来计算标签数

mysql - 获取特定行组中的最大值

linux - ASR 和 LSR 的区别

php - 在 PHP 中将 mm/dd/yy 转换为 mm/dd/yyyy

php - 对于在一个查询中表中具有相关行的每个客户端,删除除最后 10 行之外的所有行吗?

PHP MySQL 从数据库推送和拉取

linux - 如何完全静音 bash 脚本的 vlc 输出?

linux - 将目录分配给源文件中的变量