PhpmyAdmin 无法正常工作

PhpmyAdmin 无法正常工作

MySQL 说:文档

Cannot connect: invalid settings.
 mysqli::real_connect(): (HY000/2002): No such file or directory
 Connection for the control user as defined in your configuration failed.
 mysqli::real_connect(): (HY000/2002): No such file or directory
 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.

答案1

每当您在 ubuntu 上安装 XAMPP 时,都会出现 PHPMyAdmin 无法工作或 apache 停止运行的问题。即使我也遇到了同样的问题,我也找到了一个简单的解决方法。我通过以下方法停止了后端运行的 MySQL:

sudo service mysql stop

然后我使用以下命令重新启动了 XAMPP:

sudo /opt/lampp/lampp start

PHPMyAdmin 开始正常工作。

对于 Apache,我也做了同样的事情,我使用以下命令停止了该服务:

sudo systemctl stop apache2

并重新启动了XAMPP的服务,它也正常工作了。

相关内容