[PDOException] PDO::__construct(): php_network_getaddresses: getaddrinfo failed:
执行数据迁移
php artisan migrate
报错:

网上很多资料说开启allow_open_url等其实没卵用...
貌似问题出在dns上....
原来数据库的配置是这样的
DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=
修改成如下:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=
再次执行OK:

也就是把db_host改成ip形式....至于原因可能是dns问题。。。尚未深究。。。先解决问题吧,回头再研究哈具体原因吧
[PDOException] PDO::__construct(): php_network_getaddresses: getaddrinfo failed:的更多相关文章
- php提示php_network_getaddresses: getaddrinfo failed: Name or service not known
php_network_getaddresses: getaddrinfo failed: Name or service not known 面对这个错误,已经相对熟悉了.想起来应该是服务器无法访问 ...
- php_network_getaddresses: getaddrinfo failed 原因
一般在调用外部服务请求时候,有时由于配置问题无法访问,phph会报一个php_network_getaddresses: getaddrinfo failed: Name or servicenot ...
- 阿里云SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution
如果是阿里云的服务器 SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Temporary failure in ...
- dns未设置 PHP Warning: file_get_contents():php_network_getaddresses: getaddrinfo failed:
php通过去访问外部网站时,出现以下提示: PHP Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed ...
- file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
请求页面时候报错 file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not know ...
- php_network_getaddresses: getaddrinfo failed
在使用 file_get_contents远程请求url时,出现警告:php_network_getaddresses: getaddrinfo failed: Name or servicenot ...
- PDO::__construct
PDO::__construct — 创建一个表示数据库连接的 PDO 实例(PHP 5 >= 5.1.0, PECL pdo >= 0.1.0) 说明 语法 PDO::__constru ...
- PDO连接mysql8.0报PDO::__construct(): Server sent charset (255) unknown to the client. Please, report to the developers错误
安装mysql8.0之后,尝试使用php连接mysql,总是报PDO::__construct(): Server sent charset (255) unknown to the client. ...
- libcore.io.GaiException: getaddrinfo failed: EAI_NODATA (No address associated with hostname)
log报错如下: Caused by: libcore.io.GaiException: getaddrinfo failed: EAI_NODATA (No address associated w ...
随机推荐
- python基础自学 第一天
python的概述 python的创始人:吉多·范罗苏姆 1991年,第一个python解释器诞生,用C语言实现,并能调用C语音的库文件 解释器(解释型语言和编 译型语言的区别) 把其他语言翻译成计算 ...
- text-decoration:[ text-decoration-line ] || [ text-decoration-style ] || [ text-decoration-color ] 默认值:
css3中字体装饰,多样化的界面效果,: [ text-decoration-line ]:指定文本装饰的种类.相当于CSS2.1的 text-decoration 属性, 可取值:none | un ...
- [转]Understand QoS at OpenSwitch
danny http://dannykim.me/danny/57771 2014.02.11 14:34:58 (*.193.128.184) 592 >>> Purpose Th ...
- 面试官问我,使用Dubbo有没有遇到一些坑?我笑了。
前言 17年的时候,因为一时冲动没把持住(当然最近也有粉丝叫我再冲动一把再更新一波),结合面试题写了一个系列的Dubbo源码解析.目前公众号大部分粉丝都是之前的粉丝,这里不过多介绍. 根据我的面试经验 ...
- (转载)Javascript 中的非空判断 undefined,null, NaN的区别
原文地址:https://blog.csdn.net/oscar999/article/details/9353713 在介绍这三个之间的差别之前, 先来看一下JS 的数据类型. 在 Java ,C ...
- 如何解决微信小程序界面适配问题-引用-生命周期回调函数-优化机制-样式引入
如何解决微信小程序界面适配问题 .wxss page{ height: 100%; width:750rpx; } this.setData({ imageWidth: wx.getSystemInf ...
- 阿里___MQTT中协议QoS的实现
项目中用到了MQTT,由于MQTT中支持QoS,服务质量保证,在阿里面试的时候,问到如何设计QoS,一时糊涂,没有完全回答出来. 特点 MQTT - MQ Telemetry Transport ...
- python(leetcode)-重复元素算法题
leetcode初级算法 问题描述 给定一个整数数组,判断是否存在重复元素. 如果任何值在数组中出现至少两次,函数返回 true.如果数组中每个元素都不相同,则返回 false. 该问题表述非常简单 ...
- 国内使用google搜索引擎
百度搜索 "谷歌访问助手",点击第一个搜索结果,如下: 或者直接点击链接:http://www.ggfwzs.com/ ,然后点击相应的浏览器下载谷歌访问助手,解压,将解压好的谷 ...
- MapReduce中的Join
一. MR中的join的两种方式: 1.reduce side join(面试题) reduce side join是一种最简单的join方式,其主要思想如下: 在map阶段,map函数同时读取两个文 ...