我们将下载的phpmyadmin 放在apache目录中,进入phpmyadmin目录,

首先将这个目录中的配置文件改名

sudo mv config.sample.inc.php config.inc.php

然后修改config.inc.php,将

$cfg['Servers'][$i]['host'] = 'localhost';

改为

$cfg['Servers'][$i]['host'] = '127.0.0.1';

刷新网页

http://localhost/phpMyAdmin/index.php

然后使用mysql 的用户名以及密码登陆即可。

参考:

https://blog.csdn.net/elesos/article/details/81118970
https://blog.csdn.net/yjjddd85/article/details/89156139
https://blog.csdn.net/qq_36040161/article/details/79501417
https://blog.csdn.net/qq_15574035/article/details/76576990

mac 登陆phpmyadmin 提示 mysqli_real_connect(): (HY000/2002): No such file or directory的更多相关文章

  1. phpmyadmin登录提示mysqli_real_connect(): (HY000/2002): No such file or directory和mysql8登录失败的问题

    网上的解决方法有很多,但都无法解决我的问题,最后在stackoverflow上找到解决方法,原文地址:https://stackoverflow.com/questions/41881123/mysq ...

  2. 无法登录 MySQL 服务器 mysqli_real_connect() (HY000 2002) No such file or directory

    mysqli_real_connect(): (HY000/2002): No such file or directory change localhost to 127.0.0.1 in conf ...

  3. mac 连接mysql提示 Warning: mysqli::real_connect(): (HY000/2002): No such file or directory

    mac 连接mysql的时候提示 Warning: mysqli::real_connect(): (HY000/2002): No such file or directory [说明1]MAC下M ...

  4. Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2002] No such file or directory解决方法

    今天用pdo连接mysql遇到一个奇怪的问题,host设为127.0.0.1可以连接成功,设为localhost就会报如下的错误: PHP Fatal error:  Uncaught excepti ...

  5. laravel 报错SQLSTATE[HY000] [2002] No such file or directory

    在mac中执行php artisan migrate时报错 SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from i ...

  6. TP连接数据库报错:SQLSTATE[HY000] [2002] No such file or directory

     连接数据库报错:“SQLSTATE[HY000] [2002] No such file or directory”. 出现这个问题的原因是PDO无法找到mysql.sock或者mysqld.soc ...

  7. [PDOException] SQLSTATE[HY000] [2002] No such file or directory

    编译安装PHP7之后,在安装mysql之后,用pdo操作数据库的时候,出现了此错误[PDOException] SQLSTATE[HY000] [2002] No such file or direc ...

  8. Uncaught PDOException: SQLSTATE[HY000] [2002] No such file or directory

    执行下面的代码报错: $pdo = new PDO('mysql:dbname=db_test;host=localhost', 'root', '123456'); PHP Fatal error: ...

  9. PHP连接MySQL的时候报错SQLSTATE[HY000] [2002] No such file or directory

    错误环境:Mac OS 10.10 找到mysql.sock文件的位置 $sudo find / -name mysql.sock ------结果如下---------- find: /dev/fd ...

随机推荐

  1. Tomcat一闪而过的调试方法

    很少用tomcat来部署,都是用springboot微服务.只是以前学的时候搞demo试过而已. 软件测试的期末作业要求要测一个Javaweb的项目,给了一个包然后要求部署在tomcat中并启动. 然 ...

  2. java influx DB工具类

    配置 application-properties: spring.influxdb.url=${influxdb_host:127.0.0.1} spring.influxdb.port=${inf ...

  3. Spring全框架讲解

    Day 01: https://blog.csdn.net/sinat_29211659/article/details/81335229

  4. Ubuntu下编译 Hadoop2.9

    Ubuntu 下编译 Hadoop-2.9.2 系统环境 系统: ubuntu-18.10-desktop-amd64 maven: Apache Maven 3.6.0 jdk: jdk_1.8.0 ...

  5. element table中使用el-select

    效果: 然后看代码: 注意事项: el-select的v-model要和option的value值对应,注意是string还是number类型哦- 此文转载别人

  6. C++ 基础知识汇总 持续更新

    摘录一些C++面试常考问题,写一些自己的理解,花了挺长时间的,作图是真的累,欢迎来摘果子. static关键字 用于声明静态对象: 静态函数只在本文件可见.(默认是extern的) 全局静态对象:全局 ...

  7. java 原子操作(1) CAS

    在 java 多线程编程中经常说的就是:“原子操作(atomic operation) 不需要 synchronized”. 原子操作指的是不会被线程调度机制打断的操作:这种操作一旦开始,就一直运行到 ...

  8. JAVA笔记整理(九),JAVA中的集合

    在工作中,我们经常需要将多个对象集中存放,可以使用数组,但是数组的长度一旦固定之后是不可变的,为了保存数量确定的数据,我们可以使用JAVA中的集合. 在我看来,JAVA中的集合可以看作是一个特殊的数据 ...

  9. 提速1000倍,预测延迟少于1ms,百度飞桨发布基于ERNIE的语义理解开发套件

    提速1000倍,预测延迟少于1ms,百度飞桨发布基于ERNIE的语义理解开发套件 11月5日,在『WAVE Summit+』2019 深度学习开发者秋季峰会上,百度对外发布基于 ERNIE 的语义理解 ...

  10. brew install thrift

    ➜ ~ brew install thriftUpdating Homebrew...Warning: You are using macOS 10.11.We (and Apple) do not ...