- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我的 laradock 项目遇到了麻烦:我已经下载并安装了 docker,并且我已经使用 laradock 成功完成了我的 laravel 项目的设置。我使用 php 7、laravel(5.5.14) 和最新版本的 laradock。我开始在 shell 中编写我的项目:
docker-compose up -d nginx mysql
DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=homestead
DB_USERNAME=root
DB_PASSWORD=root
php artisan migrate
SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known (SQL: select * from information_schema.tables where table_schema = homestead and table_name = migrations)
SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known
PDO::__construct(): php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known
Schema::create('customers', function (Blueprint $table) {
$table->increments('id');
$table->string('first_name');
$table->string('last_name');
$table->boolean('azienda');
$table->string('iva');
$table->string('ds');
$table->boolean('fatres');
$table->string('cf');
$table->string('mail');
$table->string('telefono');
$table->integer('sponsor');
$table->string('indinst');
$table->string('civinst');
$table->string('cityInst');
$table->string('capinst');
$table->string('provinst');
$table->string('indf');
$table->string('civf');
$table->string('capf');
$table->string('provf');
$table->string('cityFatt');
$table->timestamps();
});
最佳答案
@Stefano Zaniboni 在评论中回答了这个问题,但要扩展:
我遇到这个问题是因为我习惯运行 php artisan
命令在我的本地目录中,而不是在 virtualbox/vagrant box/docker 容器中。
Laravel Docs提到您需要运行 php artisan migrate
虚拟机中的命令。
如果您使用 docker,则可以使用 docker ps
获取容器 ID。 .然后通过 ssh 进入容器,使用 docker exec -it <containerId> /bin/bash
.那么就cd
进入你的项目目录并运行 php artisan migrate
.
关于php artisan 迁移错误 : nodename nor servname provided or not know,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46725734/
我正在使用 COM 库 RCWs 。我一直发现最好的做法是在所有非托管资源超出范围之前手动释放它们并进行垃圾收集。我不希望这“减慢”我的应用程序的速度,并且我不在乎这实际上何时完成(如果有的话)在应用
我认为作为一个挑战,我应该编写一个基于 javascript 的游戏。我想要声音、图像和输入。模拟屏幕的背景(例如 640x480,其中包含我的所有图像)对于将页面的其余部分与“游戏”分开非常有用。我
在抓取网站的单个页面时,我使用 Beautiful Soup 取得了巨大成功,但我有一个新项目,我必须在其中检查大量网站,看看它们是否包含指向我网站的提及或链接。因此,我需要检查每个站点的整个站点。
我期待构建一个高度依赖地理数据的应用程序。 该应用程序将使用 HTML5 获取 GPS 数据的能力,并将进行诸如寻找最近的街道、寻找两点之间的最短路径等计算。我正在考虑使用 Google map 等平
我在使用 liquibase 时遇到问题。当我运行我的 J2EE 应用程序时,liquibase 告诉我: liquibase.exception.ValidationFailedException:
我的 iphone 上有一个应用程序,它允许我也可以通过 ftp 从我的 linux 桌面传输歌曲。应用显示主机地址为192.168.0.4并且要使用的端口是5021 .我可以从 filezilla
回答者已经知道的东西,但无论如何在这里展示我的思考过程: 从 HLL 到机器代码,这里有一组粗略的发生的事件(有链接器和其他东西,但现在让我们忽略它): HLL --> 编译器 --> 汇编器 ---
显然,下面的函数是不可能的,因为不可能永久地解开一个 IO 值(忽略 unsafePerformIO 或类似的): unwrapIO :: IO String -> String unwrapIO (
我在测试机器上安装了 Java 版本 45。高安全性设置表示无法在旧版本的 Java 上运行未签名或自签名的应用程序,事实上它无法运行自签名的小程序。 这个版本如何能够检测到它是旧版本?首次部署时它肯
怎么可能跳过 SemaphoreCI 上的一些测试?换句话说,是否有可能知道我们何时对 Semaphore 运行特定测试? 最佳答案 SemaphoreCI 将 CI 环境变量设置为 true。 有关
我知道我可以使用 xcodebuild 启动应用程序的单元测试,但我想知道什么告诉应用程序在启动期间运行测试,它是发送给应用程序的特殊参数还是它为了运行测试(使用 XCTest)进行不同的编译? 最佳
我对 Joomla 相当陌生(我更喜欢使用 Wordpress),我有一个关于模块位置的问题。 模块可以知道它所处的位置吗?例如我可以做这样的事情: if(modulePosition =='left
我有一个简单的 Spring Boot 应用程序,它从 Kafka 读取并写入 Kafka。我写了一个 SpringBootTest使用 EmbeddedKafka测试这一切。 主要问题是:有时测试失
我想知道 R 对它运行的硬件/系统有什么了解。 例如,我知道使用“sessionInfo()”会发现一些事情。但是是否也可以检查计算机的 CPU/内存?是否可以为所使用的计算机设置一些唯一标识符? 动
我试图掌握 PHP 和 MYSQL 编程,但在看到示例后,我无法理解 mysql_fetch_row 如何知道要返回哪一行。例如: 在上面的代码中,echo $row[0]; 返回表中第一列的数据,
已关闭。此问题需要 debugging details 。目前不接受答案。 编辑问题以包含 desired behavior, a specific problem or error, and the
我得到了一个 makefile,我将其修改为: ############################################ # Makefile using OCI (Oracle Ca
关闭。这个问题需要更多focused .它目前不接受答案。 想改进这个问题吗? 更新问题,使其只关注一个问题 editing this post . 关闭 4 年前。 Improve this qu
相关:What does casting do at compiler/machine level? 假设我有自定义类型。 A 型是 B 型的子类型。 最初,我的变量类型为 A 类型。然后我将其转换为
想到这里有个奇怪的问题。例如,假设您在服务器上部署了执行以下操作的代码: //GET request called when a URL is hit public void gETCalled(){
我是一名优秀的程序员,十分优秀!