Skip to content

Instantly share code, notes, and snippets.

@pH-7
Last active August 12, 2023 04:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pH-7/bf77cc930c77ecf9e9082d5a87db148d to your computer and use it in GitHub Desktop.
Save pH-7/bf77cc930c77ecf9e9082d5a87db148d to your computer and use it in GitHub Desktop.
How to setup PHP and MySQL on Mac

How to quickly setup a LAMP on MacOS

Install PHP 7.3 and MySQL 5.1+

First, let’s install the Mac dependency manager “Homebrew”

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Then, let’s install PHP and MySQL

brew tap shivammathur/php
brew install shivammathur/php/php@7.3

Now, let’s install MySQL

brew install mysql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment