mysql服务器无响应时间,#2002-服务器没有响应(或本地MySQL服务器的套接字未正确配置)...

在Ubuntu系统中,默认情况下MySQL不监听TCP/IP连接,而是使用本地套接字。要解决PHPMyAdmin无法访问的问题,需要检查MySQL配置文件中的套接字地址,并在PHPMyAdmin配置文件中更新相应的套接字路径。
摘要由CSDN通过智能技术生成

I can't access to PHPMyAdmin. when i want to go there, i got this error:

#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)

I googled this error but it don't clear.

I try to know that which port is open by this code :

pgrep mysql

two ports are open when mysql is running.

I want to access to PHPMyAdmin in my localhost. I am using Ubuntu OS

解决方案

In Ubuntu, by default mysql is not listening to TCP/IP connections. It just uses a local socket.

The current local socket is configured in /etc/mysql/my.cnf . If you open this file, you should find something similar to:

[client]

port = 3306

socket = /var/run/mysqld/mysqld.sock

What you should do is just to open PHPMyAdmin's config file (config.inc.php) and change the socket address. Maybe there's no local socket configuration on your PHPMyAdmin, or maybe it is different. This file should contain a line like (of course, adapt the address to what you found on my.cnf):

$cfg['Servers'][$i]['socket'] = '/var/run/mysqld/mysqld.sock';

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值