phpmyadmin在xampp中不起作用

kqhtkvqz  于 2021-06-21  发布在  Mysql
关注(0)|答案(4)|浏览(307)

我最近安装了xamppv3.2.2。启动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..但仍然是相同的错误。请帮助我

uqjltbpv

uqjltbpv1#

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'
zvokhttg

zvokhttg2#

我也面临着同样的问题,因为我有一个变更文件
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服务
希望这对你有帮助。

pxiryf3j

pxiryf3j3#

以下步骤对我有效:
转到mysql的data文件夹(在使用默认安装的windows上,您应该在以下路径中找到c:\xampp\mysql\data)
备份日志文件并删除它们:备份这两个文件ib\u logfile0和ib\u logfile1(注意,它们是在运行时为innodb创建的,删除它们将解决您最有可能解决的问题,尽管如此,我建议您在其他地方复制上述文件,以防删除不能解决问题。现在从原始目录xampp\mysql\data中删除它们
重新启动mysql和apache,希望它能帮助像我这样陷入这个问题的人。

laximzn5

laximzn54#

我已经在3333端口上运行了mysql,它将更改config.inc.php文件中的端口。

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

to   

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

很好,很好!
谢谢!

相关问题