PDOException SQLSTATE[HY000] [2002] No such file or directory How to fix and why this is happening?

Someone can explain what's going on here ? Where to customize and where ?
Do the following checks ..

Check php.ini -> Section Pdo_mysql and mysql :

Check php -i | grep pdo in poppy bouquet :
pdo_mysql.default_socket => /var/mysql/mysql.sock => /var/mysql/mysql.sock

Check etc/my.cnf :
# The following options will be passed to all MySQL clients
#password = your_password
port = 3306
socket = /tmp/mysql.sock

Check show variables like '%socket%' = /tmp/mysql.sock

$db = new PDO("mysql:host=localhost;dbname=users;port=3306",'root','plemia198800@@');
June 14th 19 at 18:16
0 answer

Find more questions by tags MySQLPHP PDOPHP