【发布时间】:2022-12-21 21:54:32
【问题描述】:
我已经尝试了很多我能找到的解决方案,但似乎没有任何效果。
我刚刚向 MAMP 添加了 php 版本 8.1.5。我这样做的方法是将 php 从我的 mac 复制到 MAMP 的 php 文件夹中并修改模块以使 apache 工作。现在我可以从 MAMP 中选择 PHP 8.1.5,启动服务器并正常使用我的本地应用程序。
SQL 连接也工作正常。
我遇到的问题是,当我使用 PHP 8.1.5 并尝试访问 PHP 我的管理员时,出现以下错误:
Welcome to phpMyAdmin
Error
Cannot connect: invalid settings.
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.
笔记:切换回 php 8.0.8 使它工作得很好,所以它看起来不像是配置问题,而是与 phpmyadmin 和我添加的最新 php 版本的兼容性问题。
我刚刚安装了最新的 MAMP,所以我不确定还能尝试什么。
【问题讨论】:
-
错误消息告诉您出了什么问题。两个 mysql 之间的用户名/密码不同。
标签: phpmyadmin mamp