【问题标题】:Phpmyadmin is not working in xamppPhpmyadmin 在 xampp 中不起作用
【发布时间】:2023-03-29 14:17:02
【问题描述】:

我最近安装了 xampp v3.2.2.start apache 和 mysql,当我尝试访问 php 我的管理员时出现错误

MySQL said: Documentation
#2002 - No connection could be made because the target machine actively refused it.
— The server is not responding (or the local server's socket is not correctly configured).
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.
Retry to connect

我做了以下更改 更新 config.inc.php 改变

`$cfg['Servers'][$i]['controluser'] = 'pma' to $cfg['Servers'][$i]['controluser'] = 'root';` 

$cfg['Servers'][$i]['host'] = '127.0.0.1'

$cfg['Servers'][$i]['host'] = 'localhost:8080';

删除ib_logfile0文件和ib_logfile重新启动apache..但仍然是同样的错误。请帮助我

【问题讨论】:

  • Mysql 没有在 8080 端口运行..
  • @Philipp 谢谢你的命令,所以我有 chenge 端口?来自 httpd 文件
  • 不行,在config.inc.php里面,你得用3306

标签: php mysql apache phpmyadmin


【解决方案1】:

我在 3333 端口上运行了 MYSQL,它会改变 config.inc.php 文件中的端口。

$cfg['Servers'][$i]['host'] = '127.0.0.1' 

to   

$cfg['Servers'][$i]['host'] = '127.0.0.1:3333'

可以,很好!

谢谢!

【讨论】:

    【解决方案2】:

    我遇到了同样的问题,因为我有更改文件

    xampp/mysql/bin/my.ini

    我通过以下更改解决了//应该是默认的3306。

    [客户]

    # password       = your_password 
    port            = 3307 **//it should be 3306 default.**
    socket          = "C:/xampp/mysql/mysql.sock"
    
    # The MySQL server
    [mysqld] 
    port= 3307 **//it should be 3306 default.**
    socket = "C:/xampp/mysql/mysql.sock"
    

    重启xampp中的apache和mysql服务

    希望这会对你有所帮助。

    【讨论】:

      【解决方案3】:

      以下步骤对我有用:

      1. 进入 MySQL 的 data 文件夹(在 windows 上使用默认安装你应该在这个路径 C:\xampp\mysql\data 找到)

      2. 备份日志文件并删除它们:制作这两个文件 ib_logfile0 和 ib_logfile1 的备份副本(请注意,它们是在运行时为 InnoDB 创建的,删除它们将解决您最有可能解决的问题,但我建议您在其他地方复制上述文件,以防删除不能解决问题。 现在从原目录xampp\mysql\data中删除它们

      3. 重启 MySQL 和 Apache, 希望它可以帮助像我这样陷入这个问题的人。

      【讨论】:

        【解决方案4】:

        MySQL 运行在端口3306 而不是端口8080,因此您必须更改config.inc.php 内的端口。

        $cfg['Servers'][$i]['host'] = '127.0.0.1:8080' to   $cfg['Servers'][$i]['host'] = '127.0.0.1:3306'
        

        【讨论】:

          猜你喜欢
          • 2014-09-25
          • 2012-03-17
          • 2016-01-29
          • 2017-08-12
          • 2013-09-12
          • 2017-09-02
          • 1970-01-01
          • 2017-07-27
          • 2015-02-23
          相关资源
          最近更新 更多