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]  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
I see the below which is the correct bath the php I am using
So I am not sure what i am missing to get my Magento2 running locally for development?
I have been able to install a Magento 2.2 from scratch with no issues. I am just not able to get a copy of an already developed production magento 2.2 site to run locally on my mamp server so I can further develop it.