I have a MAMP with PHP 7.1.8
up and running. I downloaded my production Magento 2.2
based website and also imported the MySQL database into my localhost phpMyAdmin.Then I changed the URL in the core_config_data
table to reflect the localhost URL to get to the site.
However now when I go to the site in the browser I get this error An error has happened during an application run. See exception log for details.
when I look at the exception.log I see it says
main.CRITICAL: PDOException: SQLSTATE[HY000] [2002] No such file or directory in /Applications/MAMP/htdocs/devkisseurope/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php:128
I googled around and see mention that it may mean that the PHP version. being used is not the same version that MAMP uses. However, I edited the ~/.bash_profile
as well as the ~/.profile
files and rebooted. now when I run
which PHP
I see the below which is the correct bath the php I am using
/Applications/MAMP/bin/php/php7.1.8/bin/php
So I am not sure what i am missing to get my Magento2 running locally for development?