phpMyAdmin登录提示mysqli_real_connect(): (HY000/2002): No such file or directory

mysql 2023-04-10 2589次浏览

最近新安装phpMyAdmin管理数据库,下载安装后打开登录,一直提示链接失败:mysqli_real_connect(): (HY000/2002): No such file or directory

因为是docker启动的nginx服务,各种修改ip和mysql的登录权限都没有成功,网上搜索一通也没解决,无奈之下还是自己上手,查看配置文件,终于找到host的配置问题,下面方法亲自调试成功,有需要的小伙伴可以直接按下方步骤执行:

1.网站根目录下找到config.sample.inc.php

2.执行命令:cp config.sample.inc.php config.inc.php

3.打开config.inc.php文件,将$cfg['Servers'][$i]['host'] 的localhost改为127.0.0.1

phpMyAdmin登录提示mysqli_real_connect(): (HY000/2002): No such file or directory

喜欢 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
(5)个小伙伴在吐槽
  1. Hi, I hope you're having a fantastic day! I just wanted to drop you a quick note because I've been thinking about how our product Adwizzo.com could really shake things up for you. And I mean that in the best way possible! Answer "Yes" to this email if you are interested. Warmest regards,
    Rudy Cooks2024-02-21 13:36 回复 Mac OS X | Chrome 114.0.0.0
  2. May I send you something to enhance your website with AI?
    Brent Fouch2024-02-13 06:34 回复 Linux | Chrome 114.0.0.0
  3. Hello, I've observed some issues with your website's performance on Google. May I send the details here?
    Bobby Ryan2024-02-08 02:52 回复 Windows 10 | Chrome 114.0.0.0
  4. Hey, I noticed something wrong with your website. Do you mind if I share a free report with you? Type 'YES', if interested.
    Arthur Klein2024-01-24 01:03 回复 Mac OS X | Chrome 114.0.0.0