Ao gerar o a URL com o comando: minikube service servico-aplicacao-sistema --url
saída: http://172.17.198.110:31935
Está gerando uma url com ip=172.17.198.110 e o mysql:host é um ip local 192.168.1.2
Erro ao acessar o banco do Alura Notícias:
PDOException Object ( [message:protected] => SQLSTATE[HY000] [2002] Connection timed out [string:Exception:private] => [code:protected] => 2002 [file:protected] => /var/www/html/funcoes.php [line:protected] => 7 [trace:Exception:private] => Array ( [0] => Array ( [file] => /var/www/html/funcoes.php [line] => 7 [function] => __construct [class] => PDO [type] => -> [args] => Array ( [0] => mysql:host=192.168.1.2;dbname=empresa [1] => root [2] => q1w2e3r4 ) ) [1] => Array ( [file] => /var/www/html/index.php [line] => 6 [args] => Array ( [0] => /var/www/html/funcoes.php ) [function] => include ) ) [previous:Exception:private] => [errorInfo] => )