Local installation of pimcore using MAMP

Hello,
I’m new to pimcore and have the following problem while local installation using MAMPon Mac OS.
It’s not possible to create a working MySQL connection:
I do the steps fro the installation guide
COMPOSER_MEMORY_LIMIT=-1 composer create-project pimcore/demo-basic my-project
cd ./my-project
./vendor/bin/pimcore-install

Database is already created with phpmyadmin.

While installation I get following result:
Running installation. You can find a detailed install log in var/installer/logs/prod.log

Checking prerequisites...

  2/11 [=====>----------------------]  18%


                                                                            
 [ERROR] The following errors were encountered during installation              
                                                                            

 * Couldn't establish connection to MySQL: An exception occurred in driver: SQLSTATE[HY000] [2002] No such file or directory

What can I do to solve this? Or do I one of the steps wrong?

This sounds like the same problem you are having:

Try the command they used (install-pimcore) instead of the ./vendor/bin/pimcore-install