首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >无法访问ubuntu中的Phpmyadmin错误mysqli_real_connect():(HY000/2002)

无法访问ubuntu中的Phpmyadmin错误mysqli_real_connect():(HY000/2002)
EN

Stack Overflow用户
提问于 2020-05-02 11:34:28
回答 1查看 620关注 0票数 0

我试图访问phpmyadmin,但发生了这种情况

代码语言:javascript
运行
复制
 MySQL said: Documentation

 Cannot connect: invalid settings.
 mysqli_real_connect(): (HY000/2002): No such file or directory
 Connection for controluser as defined in your configuration failed.
 mysqli_real_connect(): (HY000/2002): No such file or directory
 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.

apache和mysql正在运行,我的网站出现如下错误

代码语言:javascript
运行
复制
Warning: session_start(): open(/opt/lampp/temp//sess_ku01nv1mbiroo8btvpbqjv47f7, O_RDWR) failed: Permission denied (13) in /opt/lampp/htdocs/sisfo/index.php on line 2

有人知道怎么解决这个问题吗?

EN

回答 1

Stack Overflow用户

发布于 2020-05-02 11:45:22

代码语言:javascript
运行
复制
mysqli_real_connect(): (HY000/2002): No such file or directory

phpmyadmin似乎试图连接到mysql套接字(这个套接字并不存在?)。您可以尝试将config.inc.php中的主机从localhost更改为127.0.0.1

代码语言:javascript
运行
复制
Warning: session_start(): open(...) failed: Permission denied (13)

您可能对临时文件夹具有错误的权限/所有权。在您的shell中尝试以下命令:

代码语言:javascript
运行
复制
chmod 777 /opt/lampp/temp
chown -R 33:33 /opt/lampp/temp
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61554144

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档