phpmyadmin 启动apache MySQL服务器时,出现错误“(HY 000/2002):无法建立连接,因为目标计算机主动拒绝连接,”

ltskdhd1  于 2022-11-09  发布在  PHP
关注(0)|答案(1)|浏览(167)

在启动Apache服务器后,我无法访问PHPMyAdmin。当我尝试访问时,我得到一个错误并自动停止MySQL服务器。

- 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..

我如何解决这个错误

kx5bkwkv

kx5bkwkv1#

在config.inc.php下添加下面一行
$cfg['Servers'][$i]['port'] = 8111;

相关问题