HTTP 503 – Service Unavailable – craft\web\ServiceUnavailableHttpException [installation] I tried installing Craft 3.0 using composer (php composer.phar create-project craftcms/craft PATH)

And when I try to access the /web folder it's giving me the following error. I have tried removing the folder and installing it afresh again. I am currently using MAMP on my osx localhost.


  
  in /Applications/MAMP/htdocs/craft/vendor/craftcms/cms/src/web/Application.php at line 498
  in /Applications/MAMP/htdocs/craft/vendor/craftcms/cms/src/web/Application.php at line 175 – craft\web\Application::_processInstallRequest(craft\web\Request)
  in /Applications/MAMP/htdocs/craft/vendor/yiisoft/yii2/base/Application.php at line 386 – craft\web\Application::handleRequest(craft\web\Request)
  in /Applications/MAMP/htdocs/craft/web/index.php at line 21 – yii\base\Application::run()
Very likely it cannot connect to the database; that's typically what the 503 error is about:

https://httpstatuses.com/503

...so check the credentials in your .env file, and make sure that the version of MySQL that your website is using is the internal MAMP MySQL, and not the system-wide MySQL (if any).

This video may help you: Installing Craft CMS v3 with MAMP Pro

...and also a discussion of local development environments we had here might be of interest as well: Shootout at the Local Dev Corral