DB_HOST=name_of_the_mysql_service
Nov 14, 2022
14
Level 1
PDOException (2002) HELP SQLSTATE[HY000] [2002] Connection refused
good day Im running mysql in docker, but something went wrong, I don't know the main reason, I did search already but didn't find the answer yet. pls help me I'm new in docker thank you.
the error message,,
public function createConnection($dsn, array $config, array $options)
{
$username = Arr::get($config, 'username');
$password = Arr::get($config, 'password');
try {
$pdo = new PDO($dsn, $username, $password, $options);
} catch (Exception $e) {
$pdo = $this->tryAgainIfCausedByLostConnection(
my .env file,,
DB_CONNECTION=mysql
DB_HOST=0.0.0.0
DB_PORT=3306
DB_DATABASE=eca01
DB_USERNAME=root
DB_PASSWORD=admin123
DB_PREFIX=tb_
Please or to participate in this conversation.