SQLSTATE[HY000]  No such file or directory
During or after installation, a message similar to the following displays:
Exception' with message 'PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]  No such file or directory
This is commonly caused by a different instance of PHP
being used by the PHP command line compared to the web server. In particular,
mysql.sock might be misconfigured if this is the case.
To determine whether or not you’re using one instance of PHP:
- Log in to your Magento server.
Enter the following command:
php -i | grep 'php.ini'
This determines the settings used by the PHP command-line interface (CLI). Note where
- If you haven’t already done so, set up a phpinfo.php on your web server.
Compare the value of Loaded Configuration File from
phpinfo.phpwith the one from
php.inifile used by your web server. If it’s different from what’s in PHP’s
php.ini, you must make all PHP settings consistent for both the PHP CLI and the web server.
For additional details, consult the documentation provided with your web server.