mysql.sock

PHP PDO + Warning: PDO::__construct() [pdo.–construct]: [2002] Invalid argument (trying to connect via unix://)

If you are trying to establish a connection handle by using PDO, you might have encountered this error: Warning: PDO::__construct() : Invalid argument (trying to connect via unix://)

A Glance At What Can Go Wrong Between Your WordPress Installation and MySQL

While installing your wordpress package, you might often have seen errors like “Error establishing a database connection”. There four possible causes to this error.