Jump to content

Recommended Posts

Hi all. I encountered a problem in my laboratory work on web technologies. When I use the php artisan migrate command I get the following error. 

Illuminate\Database\QueryException 

  SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for db failed: nodename nor servname provided, or not known (Connection: mysql, SQL: select table_name as `name`, (data_length + index_length) as `size`, table_comment as `comment`, engine as `engine`, table_collation as `collation` from information_schema.tables where table_schema = 'db' and table_type in ('BASE TABLE', 'SYSTEM VERSIONED') order by table_name)

  at vendor/laravel/framework/src/Illuminate/Database/Connection.php:813

809▕                     $this->getName(), $query, $this->prepareBindings($bindings), $e

810▕                 );

811▕             }

812▕ 

  ➜ 813▕             throw new QueryException(

814▕                 $this->getName(), $query, $this->prepareBindings($bindings), $e

815▕             );

816▕         }

817▕     }

+48 vendor frames 

  49  artisan:13

Illuminate\Foundation\Application::handleCommand(Object(Symfony\Component\Console\Input\ArgvInput))

I am using ddev. MacOS. I've already tried everything and don't know how to fix it. Who knows how to fix this?

Link to comment
https://forums.phpfreaks.com/topic/320094-php-artisan-migrate-error/
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.