Setting up MySql with MacOs
Step1: Installation from brew.
Step2: Run this command if we don’t want to run MySql in background.
or for running it in background or at login run this command.
I prefer not to run it in background or when i login into my mac.
Step3: Let’s check it is working correctly.
Connect to MySQL.
Run the Query.
Step4: For turning it off we can use this command (Only if you not running it in background).
Step5:(Optional): We can add alias for it for starting it and stopping it.
add alias in ~/.zshrc file or if you bash add it in ~/.bashrc file.
sql-start
sql-stop
By doing this you can start and stop it when need.