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 a skilled programmer specializing in Vue.js/Nuxt.js for front-end development and PHP Laravel for back-end solutions. I have a strong focus on API design and development, complemented by experience in web server setup and maintenance. My versatile expertise ensures seamless creation and maintenance of web applications, covering everything from intuitive user interfaces to robust server-side functionality. Passionate about coding and driven by a lifelong learning mindset, I invite you to explore more at danyal.dk.