php - Can't access Phpmyadmin in ubuntu error mysqli_real_connect(): (HY000/2002)
问题描述
我试图访问 phpmyadmin 但这件事发生了
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 正在运行,我的网站有这样的错误
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
有谁知道如何解决这一问题?
解决方案
mysqli_real_connect(): (HY000/2002): No such file or directory
似乎 phpmyadmin 试图连接到 mysql 套接字(它不存在?)。您可以尝试将主机从您config.inc.php
更改localhost
为127.0.0.1
。
Warning: session_start(): open(...) failed: Permission denied (13)
您可能对临时文件夹有错误的权限/所有权。在你的 shell 中尝试这些命令:
chmod 777 /opt/lampp/temp
chown -R 33:33 /opt/lampp/temp
推荐阅读
- ios - Apple 支付集成:已解密 ...但如何将解密后的 json 发送到 Payeezy 预期格式
- javascript - 我想让用户调整大小的嵌入式 Youtube 视频,同时保持纵横比
- c# - 如何从后台运行的控制器调用函数
- webpack - 我可以在没有服务器的情况下使用 write-file-webpack-plugin 编写文件吗?
- javascript - 如何使用 javascript 将上传的照片保存到我的 HTML 项目中
- javascript - React:在子组件中运行函数在所有同类子组件中运行函数
- css - 下拉菜单显示/隐藏
- r - R Studio 控制台中表格的颜色
- swift - Userdefaults 中的 Firebase ID
- ios - 核心数据崩溃抓取