SQLSTATE[HY000] [2002] No such file or directory

ESTOU COM ESSE ERRO. já tentei de tudo e não resolvi.
SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from information_schema.tables where table_schema = curso-laravel9 and table_name = migrations and table_type = 'BASE TABLE')
at vendor/laravel/framework/src/Illuminate/Database/Connection.php:760
756▕ // If an exception occurs when attempting to run a query, we'll format the error
757▕ // message to include the bindings with SQL, which will make this exception a
758▕ // lot more helpful to the developer instead of just the database's errors.
759▕ catch (Exception $e) {
➜ 760▕ throw new QueryException(
761▕ $query, $this->prepareBindings($bindings), $e
762▕ );
763▕ }
764▕ }
+39 vendor frames
40 artisan:37
Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
Olá, Christian!
Tudo bem?
No seu setup, o que está usando? Docker?
Me descreva um pouco mais o seu ambiente, que te ajudo a resolver.

Cara, estou usando docker sim. Vou te mandar a minha config atual.

PS: já tentei colocar no DB_HOST= mysql | 127.0.0.1 | {IP DO CONTAINER}

minha configuração docker:

DB_HOST precisa ser o nome do serviço (container) do banco de dados, no caso:
DB_HOST=mysql
--
Quando rodou os comandos, estava dentro do container?
docker exec app bash
php artisan migrate

sim, eu estava dentro do container e testei com o DB_HOST=mysql

Ah sim, olhei agora novamente os logs, você deixou o seu banco de dados com caracter especial: curso-laravel9
Deixa "curso_laravel9"

Precisa estar logado para conseguir responder a este ticket!
Clique Aqui Para Entrar!