mac 登陆phpmyadmin 提示 mysqli_real_connect(): (HY000/2002): No such file or directory
我们将下载的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的更多相关文章
- phpmyadmin登录提示mysqli_real_connect(): (HY000/2002): No such file or directory和mysql8登录失败的问题
网上的解决方法有很多,但都无法解决我的问题,最后在stackoverflow上找到解决方法,原文地址:https://stackoverflow.com/questions/41881123/mysq ...
- 无法登录 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 ...
- 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 ...
- 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 ...
- 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 ...
- TP连接数据库报错:SQLSTATE[HY000] [2002] No such file or directory
连接数据库报错:“SQLSTATE[HY000] [2002] No such file or directory”. 出现这个问题的原因是PDO无法找到mysql.sock或者mysqld.soc ...
- [PDOException] SQLSTATE[HY000] [2002] No such file or directory
编译安装PHP7之后,在安装mysql之后,用pdo操作数据库的时候,出现了此错误[PDOException] SQLSTATE[HY000] [2002] No such file or direc ...
- Uncaught PDOException: SQLSTATE[HY000] [2002] No such file or directory
执行下面的代码报错: $pdo = new PDO('mysql:dbname=db_test;host=localhost', 'root', '123456'); PHP Fatal error: ...
- PHP连接MySQL的时候报错SQLSTATE[HY000] [2002] No such file or directory
错误环境:Mac OS 10.10 找到mysql.sock文件的位置 $sudo find / -name mysql.sock ------结果如下---------- find: /dev/fd ...
随机推荐
- C# 字符串补位方法
string i=9; 方法1:Console.WriteLine(i.ToString("D5")); 方法2:Console.WriteLine(i.ToString().Pa ...
- ASP.NET Core 2.1 中的 HttpClientFactory (Part 2) 定义命名化和类型化的客户端
原文:https://www.stevejgordon.co.uk/httpclientfactory-named-typed-clients-aspnetcore 发表于:2018年1月 上一篇文 ...
- Spark机器学习基础-无监督学习
0.K-means from __future__ import print_function from pyspark.ml.clustering import KMeans#硬聚类 #from p ...
- Django学习笔记 (一) 开发环境配置
Django是一个开放源代码的Web应用框架,由Python写成. 采用了MVC的软件设计模式,即模型M,视图V和控制器C. 1. Python安装 下载地址: http://www.python.o ...
- Linux建立虚拟ip的方法
文章来源 运维公会:Linux建立虚拟ip的方法 1.虚拟ip的介绍 虚拟IP地址(VIP) 是一个不与特定计算机或一个计算机中的网络接口卡(NIC)相连的IP地址.数据包被发送到这个VIP地址, ...
- 对于Linux中文件描述符的疑问以及解决
问题 每次web服务器或者是几乎所有Linux服务器都需要对文件描述符进行调整,我使用ulimit -n来查看当前用户的最多能打开的文件,默认设置的是1024个,但是系统运行起来以及开启一些简单的 ...
- vue框架之脚手架(vue-cli)的使用
前期准备 1.在使用之前需要安装node.js,https://nodejs.org/dist/latest-v8.x/ 2.下载之后在cmd中测试 node -v npm -v 如图上即可 3.下载 ...
- java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver
SpringBoot运行报错——java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized or rep ...
- python装饰器,迭代器,生成器,协程
python装饰器[1] 首先先明白以下两点 #嵌套函数 def out1(): def inner1(): print(1234) inner1()#当没有加入inner时out()不会打印输出12 ...
- vue-resouce设置请求头