osMac and brew for PHP 7.2 & MySQL 5.6

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

Author: Danyal
I'm skilled programmer with expertise in Vue.js/Nux.js for front-end development and PHP Laravel for back-end development. I excel in building APIs and services, and also have experience in web server setup & maintenance. My versatile skill set allows you to develop and maintain web applications effectively, from the user interface to the server-side functionality. I love coding with never ending learning attitude, thanks for visiting danya.dk