When I run static content deploy on my local Magento2 instance I get this error message:
[PDOException] SQLSTATE[HY000]  No such file or directory
Is this a etc/hosts and/or virtual hosts issue?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
This is a combination of issues. This article outlines the problem you are having:
And this goes over how to fix it:
While there are a few different ways to fix this, i have linked to the one solution that i have used.