I'm trying to create a module on a local installation of Magento 2.1.4.
i'm getting this error when running bin/magento setup:upgrade:
[Zend_Db_Adapter_Exception]
SQLSTATE[HY000] [2002] No such file or directory
[PDOException]
SQLSTATE[HY000] [2002] No such file or directory
setup:upgrade [--keep-generated] [--magento-init-params="..."]
After this i tried this solution: Cannot create new module in magento2 - php bin/magento setup:upgrade
The outcome was the same and there is not much explanation on what this did to solve the problem.
I also read solutions from almost a year ago when apparently this was a common issue deleting var/cache, var/generation and var/di but that didn't worked either.