「 getaddrinfo failed: Temporary failure in name resolution 」というエラーが出ました

Docker を再起動してみましょう。
2021年9月9日
ユーザー

お世話になります。

./vendor/bin/sail artisan migrate

上のコマンドを実行しましたが、
名前解決ができないというエラーメッセージが発生しています。

以下エラーメッセージです。

SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution (SQL: select * from information_schema.tables where table_schema = mybbs and table_name = migrations and table_type = 'BASE TABLE')

  at vendor/laravel/framework/src/Illuminate/Database/Connection.php:692
    688▕         // If an exception occurs when attempting to run a query, we'll format the error
    689▕         // message to include the bindings with SQL, which will make this exception a
    690▕         // lot more helpful to the developer instead of just the database's errors.
    691▕         catch (Exception $e) {
  ➜ 692▕             throw new QueryException(
    693▕                 $query, $this->prepareBindings($bindings), $e
    694▕             );
    695▕         }
    696▕     }

      +36 vendor frames
  37  artisan:37
      Illuminate\Foundation\Console\Kernel::handle()

一回目は migrations 実行時正常にコマンドが進みましたが、
第四章をやり直したところ次のようなエラーメッセージで詰まってしまいました。

この回答を見るにはプレミアムプランへの登録が必要です

プレミアムプランとは?