Dockerized Laravel SQLSTATE[HY000] [2002] Connection refused

  docker, laradock, laravel, linux, mysql

I’ve set up a Laravel project with laradock and docker tried to run it and it gave me SQLSTATE[HY000] [2002] Connection refused error. Here is some of my config files;

  1. Laradock .env : https://pastebin.ubuntu.com/p/7r5BbvPQQk/
  2. Laravel .env : https://pastebin.ubuntu.com/p/kK5mvTGTnT/
  3. App.php : https://0bin.net/paste/fgkNY3Vq#KAx7DNYux3jaRVelaPac41AxA6blXjrL0hTXr7OaxKS

I’ve looked at this post but didn’t helped me. I run Ubuntu 20.04 and i work with Docker. I tried them just in case but didn’t worked out for me. Any help is appreciated.

Source: Docker Questions

LEAVE A COMMENT