SQLSTATE[HY000] [2002] No such file or directory

I forget to mention that a few days ago, I tried to solution the issue of this post, editing the next file: /app/etc/env.php and I changed 127.0.0.1 instead localhost
but nothing get better.

Have sense that you said about incorrect credentials or MySQL port blocked. The MySQL stopped isn’t possible because I can search in Magento customer view and get product results. Well this make me think if it’s possible have wrong credentials or port blocked and works fine in the customer view?
Whatever I will go deeply and let you known…
Personally I do not like the response when typing a command in SSH and Magento reply > Magento supports PHP 7.1.3 or later.
I just execute once the next command from cronjob:
/opt/plesk/php/7.3/bin/php /var/www/vhost/mydomain.com/subdomain.mydomain.com/bin/magento setup:upgrade

let’s see what happens, I will let you known…