我将默认端口从 80 更改为 8080,但是当我运行 localhost 时,出现以下错误:
Cannot connect: invalid settings.
mysqli_real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it.
Connection for controluser as defined in your configuration failed.
mysqli_real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it.
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.
Retry to connect
最佳答案
检查您的防火墙,为您的 XAMPP/WAMPP 应用程序添加传入/传出规则并允许所有端口(启用复选框)。
查看此线程,因为您的问题似乎很相似:Configure firewall to enable XAMPP working over LAN
祝一切顺利!
关于PHP MySQL 本地主机连接问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58047585/