![]() |
Centos 8 외부 mysql 접속이 안 될 때
[GCP]
작성일시 : 2021. 01. 10 (16:24)
|
되던 접속이 안 될 때, 오류 로그를 살펴보자.
[root@onnada-instance nginx]# tail -f /var/log/nginx/error.log
2021/01/10 16:15:05 [error] 133349#0: *17 FastCGI sent in stderr: "PHP message: PHP Warning: mysqli_connect(): (HY000/2002): Permission denied in /home/onna/lib/Core/Database.php on line 239" while reading response header from upstream, client: 175.197.46.206, server: onnada, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/www.sock:", host: "34.xxx.xxx.xxx"
적용
[root@onnada-instance nginx]# setsebool -P httpd_can_network_connect 1
