Published on May 15, 2020

Let’s Install MySQL 5.7 on OS X

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"

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 mysql@5.7

I’ll expect the output like this mysql@5.7: stable 5.7.24 (bottled) [keg-only]. If so, now you can install the mysql itself by run this command:

brew install mysql@5.7

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 mysql@5.7

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 mysql@5.7 — 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 5.7.24. 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 :)

Login to make a comments. Don't worry, it's free.
© 2020 Irsyad Notes