Install/Upgrade PHP:
Follow the steps below to upgrade / install PHP 7.1 to 7.2
Step1: Make sure the brew is updated
brew update
brew upgrade
Step2: Unlink the previous PHP version
brew unlink php71
Step:3 Once you have performed first 2 steps successfully, run final command to install PHP 7.2
brew install php72
Install mySQL:
Run follow command to install mySQL
brew install mysql@5.7
To start mySQL run:
brew services start mysql@5.7
Once database installed, MySQL database will be without a root password, to secure it run:
mysql_secure_installation
MySQL is configured to only allow connections from localhost by default:
To connect run:
mysql -uroot