久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

      <bdo id='kbnrg'></bdo><ul id='kbnrg'></ul>

  1. <tfoot id='kbnrg'></tfoot>

    <legend id='kbnrg'><style id='kbnrg'><dir id='kbnrg'><q id='kbnrg'></q></dir></style></legend>

    <small id='kbnrg'></small><noframes id='kbnrg'>

      <i id='kbnrg'><tr id='kbnrg'><dt id='kbnrg'><q id='kbnrg'><span id='kbnrg'><b id='kbnrg'><form id='kbnrg'><ins id='kbnrg'></ins><ul id='kbnrg'></ul><sub id='kbnrg'></sub></form><legend id='kbnrg'></legend><bdo id='kbnrg'><pre id='kbnrg'><center id='kbnrg'></center></pre></bdo></b><th id='kbnrg'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='kbnrg'><tfoot id='kbnrg'></tfoot><dl id='kbnrg'><fieldset id='kbnrg'></fieldset></dl></div>
    1. php artisan migrate錯誤:提供或不知道節點名或服務名

      php artisan migrate error: nodename nor servname provided or not know(php artisan migrate錯誤:提供或不知道節點名或服務名)

      1. <legend id='nBDHA'><style id='nBDHA'><dir id='nBDHA'><q id='nBDHA'></q></dir></style></legend>

        • <small id='nBDHA'></small><noframes id='nBDHA'>

        • <tfoot id='nBDHA'></tfoot>
        • <i id='nBDHA'><tr id='nBDHA'><dt id='nBDHA'><q id='nBDHA'><span id='nBDHA'><b id='nBDHA'><form id='nBDHA'><ins id='nBDHA'></ins><ul id='nBDHA'></ul><sub id='nBDHA'></sub></form><legend id='nBDHA'></legend><bdo id='nBDHA'><pre id='nBDHA'><center id='nBDHA'></center></pre></bdo></b><th id='nBDHA'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='nBDHA'><tfoot id='nBDHA'></tfoot><dl id='nBDHA'><fieldset id='nBDHA'></fieldset></dl></div>

            <tbody id='nBDHA'></tbody>
              <bdo id='nBDHA'></bdo><ul id='nBDHA'></ul>

                本文介紹了php artisan migrate錯誤:提供或不知道節點名或服務名的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我的 laradock 項目遇到了麻煩:我已經下載并安裝了 docker,并且我已經使用 laradock 成功完成了我的 laravel 項目的設置.我使用 php 7、laravel(5.5.14) 和最新版本的 laradock.我開始在 shell 中編寫我的項目:

                I'm in trouble with my laradock project: i have downloaded and installed docker and i have successfully completed the setup of my laravel project with laradock. I use php 7, laravel(5.5.14) and the latest version of laradock. I start my project writing in shell:

                docker-compose up -d nginx mysql
                

                然后所有服務都啟動了.我的 env 文件是:

                and all services starts. My env file is:

                DB_CONNECTION=mysql
                DB_HOST=mysql
                DB_PORT=3306
                DB_DATABASE=homestead
                DB_USERNAME=root
                DB_PASSWORD=root
                

                但是當我嘗試將遷移與

                But when i try to use the migration with

                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 
                

                我的名為 homestead 的數據庫已創建并且可以正常工作.在我的 Laravel 項目中,在遷移文件夾下我有 3 個文件 php:create_user_tablecreate_password_reset_tablecreate_customer_table(我寫了這個文件).我需要在我的數據庫中創建一個名為 customer 的表,其中包含一些列:

                My db called homestead is created and it works. In my laravel project, under the migration folder i have 3 files php: create_user_table, create_password_reset_table and create_customer_table( i have wrote this file). I need to create a table in my db called customer with some colums:

                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();
                    });
                

                如何完成遷移并創建表?謝謝解答!

                How can i complete the migration and create the table? Thank you for answer!

                推薦答案

                @Stefano Zaniboni 在評論中回答了這個問題,但要擴展:

                @Stefano Zaniboni answered this in a comment but to expand:

                我遇到這個問題是因為我習慣于在本地目錄而不是在 virtualbox/vagrant box/docker 容器中運行 php artisan 命令.

                I ran across this issue because I'm used to running php artisan commands in my local directory rather than in a virtualbox / vagrant box / docker container.

                Laravel Docs 提到您需要運行 phpartisan migrate 命令從你的虛擬機中.

                The Laravel Docs mention that you need to run the php artisan migrate command from within your virtual machine.

                如果您使用 docker,則可以使用 docker ps 獲取容器 ID.然后使用 docker exec -it ssh 進入容器./bin/bash.然后只需 cd 進入您的項目目錄并運行 php artisan migrate.

                If you're using docker, you can get your container id using docker ps. Then to ssh into the container use docker exec -it <containerId> /bin/bash. Then just cd into your project directory and run php artisan migrate.

                這篇關于php artisan migrate錯誤:提供或不知道節點名或服務名的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標不起作用)
                PHP PDO ODBC connection(PHP PDO ODBC 連接)
                Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術方法)
                php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                MSSQL PDO could not find driver(MSSQL PDO 找不到驅動程序)
                  <bdo id='V8j4l'></bdo><ul id='V8j4l'></ul>
                      <tbody id='V8j4l'></tbody>
                    1. <i id='V8j4l'><tr id='V8j4l'><dt id='V8j4l'><q id='V8j4l'><span id='V8j4l'><b id='V8j4l'><form id='V8j4l'><ins id='V8j4l'></ins><ul id='V8j4l'></ul><sub id='V8j4l'></sub></form><legend id='V8j4l'></legend><bdo id='V8j4l'><pre id='V8j4l'><center id='V8j4l'></center></pre></bdo></b><th id='V8j4l'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='V8j4l'><tfoot id='V8j4l'></tfoot><dl id='V8j4l'><fieldset id='V8j4l'></fieldset></dl></div>

                        <tfoot id='V8j4l'></tfoot>

                          <small id='V8j4l'></small><noframes id='V8j4l'>

                          <legend id='V8j4l'><style id='V8j4l'><dir id='V8j4l'><q id='V8j4l'></q></dir></style></legend>
                        1. 主站蜘蛛池模板: 波多野结衣一区二区 | 午夜影院网站 | 亚洲欧美久久 | 欧美日韩视频在线播放 | 精品美女久久久 | 人人草天天草 | 国产精品美女久久久av超清 | 综合久久综合久久 | 一区二区不卡高清 | 久久久久久蜜桃一区二区 | 欧美一区二区在线播放 | 热久久999 | 欧美看片 | 久久天堂 | 国产精品久久久久久福利一牛影视 | 日韩电影一区 | 天天综合久久 | 99热热99 | 九九一级片 | 99久久免费精品 | 欧美二区三区 | 国产福利观看 | 久久久久久久一区二区三区 | 久久久久久国产免费视网址 | 亚洲福利 | 国产精品揄拍一区二区 | 精品亚洲视频在线 | 成人在线精品视频 | 九九热精品视频 | 91高清视频在线观看 | 日日骚网| www亚洲精品 | 久久人操 | 亚洲欧美中文日韩在线v日本 | 欧美激情综合网 | 日韩av免费在线观看 | cao在线| 亚洲一区二区在线视频 | 91视频国产一区 | 911精品国产 | 精品蜜桃一区二区三区 |