Why not connect to database on another server using php?

Welcome! You have a server with asterisk and the external address remotely to the database I go through phpmyadmin, programs such as heidisql and mysql workcbench is also connected. But PHP can't connect(error 504)
$mysqli = new mysqli('host', 'user', 'pass', 'db', 6306);
June 27th 19 at 15:10
1 answer
June 27th 19 at 15:12
You php-fpm is not running. Naladte his first, in the logs of nginx and php-fpm view.

Find more questions by tags PHP