uvlazhnitel Posted April 23 Share Posted April 23 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? Quote Link to comment https://forums.phpfreaks.com/topic/320094-php-artisan-migrate-error/ Share on other sites More sharing options...
requinix Posted April 23 Share Posted April 23 If you're not running this in Docker, or perhaps even if you are, it sounds like your database configuration wasn't set up properly. Check the hostname you have it using. Quote Link to comment https://forums.phpfreaks.com/topic/320094-php-artisan-migrate-error/#findComment-1622213 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.