From 0b9acaf9eb8ba65595fe2762abfa79b0cd636acf Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Fri, 21 May 2021 18:59:15 +0100 Subject: Add defer attribute to js links --- .../index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'www/posts/laravel/2020-12-14') diff --git a/www/posts/laravel/2020-12-14/sqlstate-hy000-2002-php-network-getaddresses-getaddrinfo-failed/index.html b/www/posts/laravel/2020-12-14/sqlstate-hy000-2002-php-network-getaddresses-getaddrinfo-failed/index.html index 88ed736..2396d42 100644 --- a/www/posts/laravel/2020-12-14/sqlstate-hy000-2002-php-network-getaddresses-getaddrinfo-failed/index.html +++ b/www/posts/laravel/2020-12-14/sqlstate-hy000-2002-php-network-getaddresses-getaddrinfo-failed/index.html @@ -41,7 +41,7 @@ Illuminate\Database\QueryException +33 vendor frames 34 artisan:37 Illuminate\Foundation\Console\Kernel::handle()

The cause of this issue is due to a change introduced to the .env.example file. This changed the environment variable DB_HOST from 127.0.0.1 to mysql. The reason for this change is to support [Laravel Sail](https://laravel.com/docs/8.x/sail) which is a Docker development environment for Laravel.

The change means your Laravel application will try and connect to a database server with the hostname of mysql. Unless this exists then the application can't connect.

To resolve the issue just change the value back to 127.0.0.1

DB_HOST=127.0.0.1

Links

Commit that changed .env.example.Laravel SailLaravel - Read More Posts.

I don't have comments as I don't want to manage them. You can however contact me at the below address if you want to.

Email david@davidtsadler.com

License

The contents of this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Copyright © 2021 David T. Sadler.

Return to Homepage. - - + + -- cgit v1.2.3-13-gbd6f