I followed exactly this setup:
https://github.com/magento/magento2-samples/tree/master/sample-module-minimal
and added the registration.php file, and run php bin/magento module:enable Company_Basic, but after I run php bin/magento setup:upgrade I get the following error:
[PDOException]
SQLSTATE[HY000] [2002] No such file or directory
If I change from localhost to 127.0.0.1 in env.php I get:
[Zend_Db_Adapter_Exception]
SQLSTATE[HY000] [2002] Connection refused
Now the website throws this error:
Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory.
The following modules are outdated:
Company_Basic
I'm using mamp. I installed magento2 ok, but now it appears that mysql is connecting. Any ideas? Thanks!
Update: If I run /Applications/MAMP/Library/bin/mysqld --version
I get
/Applications/MAMP/Library/bin/mysqld Ver 5.6.25 for osx10.6 on x86_64 (MySQL Community Server (GPL))