In this tutorial, I will show you how exactly the way you install mysql 5.7 in your Mac. Just ignore if you are in windows :) So the first thing you need to do is you have to make sure that brew has been installed in your machine. Otherwise you can do now like so
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
When you’ve installed, now we can continue to install the core that we are talking about. Now when you enter this command:
brew info firstname.lastname@example.org
I’ll expect the output like this email@example.com: stable 5.7.24 (bottled) [keg-only]. If so, now you can install the mysql itself by run this command:
brew install firstname.lastname@example.org
After you finish it, now you running this command: `brew tap homebrew/services to install the brew services. Now you can start the mysql service by running this command:
brew services start email@example.com
Then please make sure that service has been ran.
brew services list
You’re done ? Yes if you’re fresh installed your new OS, but if you’re not, you need to link the brew to the mysql you’ve just installed, to do that. All you need to do is:
brew link firstname.lastname@example.org — force
Now, you need to make sure that version is the same with you’ve just install, check this out with:
mysql -V, at this time of writing, it will show you like this
By the default, brew will install you the mysql without a password credentials, but you can modify it by running this command:
mysqladmin -u root password 'your_secret_password'
Make sure you type the password with the single quote. But if you’re in local environment, just let it by default (without password) Now you can manage your database by using anything you want, but I highly recommend you to use SequelPro.
That’s it for today! Happy hacking :)